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 bug seems to be caused by the fact that code inside show() is triggering a scrollstart event while still in the midst of handling the scrollstop event. This threw off the setting of showAfterScroll causing the currentstate to be stuck at "inline", so no hide/show code is ever triggered after that.
- Modified the scrollstart and sccrollstop callbacks to set showAfterScroll prior to calling show()/hide().
- movied the hide() call in scrollstart handler underneath the check for 'overlay'.
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.