jQuery Mobile widget and form utilities
We've mentioned numerous times how jQuery Mobile automatically updates various items and supports things, such as lists and collapsible content. One of the things you may run into, however, is trying to get jQuery Mobile to work with the content loaded after the page is rendered. So, for example, imagine a listview
that has data added to it via some JavaScript code. The code in Listing 9-8
demonstrates a simple example of this. It has a listview
with a few items in it, and it also has a form by which a person could add new entries:
Listing 9-8: test5.html <div data-role="page" id="third"> <div data-role="header"> <h1>List Updates</h1> </div> <div role="main" class="ui-content"> <ul id="theList" data-role="listview" data-inset="true"> <li>Initial</li> ...