Adding Form Elements
jQuery Mobile elements are for the most part standard. jQuery Mobile formats them for better display on mobile devices. However, there are a few data attributes that you should be aware of:
data-role="fieldcontain"—Add to a container class around multiple form elements. Helps mobile elements, especially <label>
elements, track closer.
class="ui-hide-label">—Adding this class to a fieldcontain
container causes the label to hide.
data-role="button"—Forces <a>
links to be displayed as mobile buttons.
data-icon—Specifies an icon ...
Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.