* beforepageshow
* beforepagehide
* pageshow
* pagehide
All are triggered before and after the pageChange function runs.
The event.target will always be a "ui-page" div, triggered on either the showing or hiding page.
The second argument passed to the callback function contains either a prevPage or nextPage property, referencing a jQuery object containing the opposite page.
- Added code to mobilize that processes page and content roles prior to form element processing. I left the code that processes page and content roles in the main processing loop just in case pages/content are injected dynamically by other roles.
The function used to iterate over all pages was making reference to th e$el variable passed into mobilize(). This meant it was executing the same operation over *ALL* pages several times, once for each page in the document.
- Redefined $el in the funciton passed to the each() method.
The logic will actually support multi-option selects as well, but the labels are flipped in order for switch-style controls, so if we want to support regular sliders from selects, the labels will have to be in forward order and beneath the slider bar.
1. added the $.mobile object, for storing public options used in core and other plugins that should be made configurable externally, somehow.
2. With this change comes the first property $.mobile: subPageUrlKey, which defaults to "ui-page" and becomes the URL parameter for denoting a generated sub-page of a particular URL. For example, you can now deep-link to sub-levels of a nested listview like this:
jquerymobile.com/test/#_listview.html&ui-page=listview-2
...in which "listview-2" refers to a generated page created by _listview.html when mobilize() runs on it.
Note that this &ui-page parameter is used for splitting the hash to find the right part to use for the ajax request for the real url (_listview.html), while the ID of the actual subpage div really uses the whole thing: "_listview.html&ui-page=listview-2".
The other idea is that after the "&ui-page=" part, plugins should use an ID that reflects their widget name. For example, &ui-page=listview-2 or &ui-page=globalnav.
Before this change, subpages would use the whole hash without mentioning their parent page url, so you'd end up with blank pages if you hit refresh while viewing a generated sub-page.