O'Reilly logo

jQuery Mobile Web Development Essentials Second Edition by Andy Matthews, Raymond Camden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 content loaded after the page is rendered. So, for example, imagine a list view that has data added to it via some JavaScript code. Code 9-8 demonstrates a simple example of this. It has a listview with a few items in it, but also a form by which a person could add new entries:

Code 9-8: test5.html <div data-role="page" id="third"> <div data-role="header"> <h1>List Updates</h1> </div> <div data-role="content"> <ul id="theList" data-role="listview" data-inset="true"> <li>Initial</li> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required