The "page()" widget method created a jQuery Mobile page (consider it a virtual page, it's what takes up the entirety of your browser's screen, but not an HTML page in the traditional sense), meaning it adds all of the necessary data, classes, event handlers, etc. Calling page() on an existing page, essentially refreshes the page.
Calling page on $('.placeholder') actually makes placeholder a page, which is probably not what you intended.
Consider this instead of your first example:
- <div id="myPage" data-role="page">
- <ul class="one">
- <li>something</li>
- <li>something
- <ul class="two">
- </ul>
- </li>
- </ul>
- </div>
Now, to update everything on the page, including the nested listviews, call the following:
The page method turns all appropriately marked-up DOM elements into widgets (listviews, buttons, sliders, form elements etc.), so this is probably overkill if our goal is only to refresh the listviews. The following code is a bit less wasteful for such a specific task:
- $('.one,.two').listview('refresh');
Now this should work, but our selector is still pretty specific, so maybe you want something more like this:
- $('.one,.one ul').listview('refresh');
This selector will refresh .one, and any ul that is a descendant of .one, which should work great assuming all descendant ul elements of .one are actually list views.
Hope that helps!
-Eric