jQuery.mobile.navigate( url [, data ] )Returns: Undefinedversion added: 1.3
Description: Alter the url and track history. Works for browsers with and without the new history API.
The $.mobile.navigate
method provides a uniform history manipulation API for browsers that support the new history API and those that don't (hashchange). It works in concert with the navigate event by storing and retrieving arbitrary data in association with a URL (much like popState
and replaceState
). When the user returns to a URL set by the navigate method the navigate event is triggered with the associated data.
Examples:
Change the hash fragment twice then log the data provided with the navigate event when the browser moves backward through history.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
|
Hijack a link click to use the navigate method and then load content.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
|