5. Dialog Windows and Buttons

No mobile website or application is complete without dialog windows, pop-ups, and buttons to provide feedback and options to users. The jQuery Mobile framework lets you create all of these with the addition of a simple data-rel attribute.

Creating a Basic Dialog Window

Creating a basic dialog window is easy with jQuery Mobile. Just use the data-rel attribute on any anchor tag and set its value to dialog:

data-rel="dialog"

Dialog windows can be included with a page or pages in a single HTML file just like a multipage template, or they can be external webpages like a single-page template. To create a multipage template that includes a dialog window, you simply add another jQuery Mobile page—the difference is in how ...

Get jQuery Mobile: Develop and Design 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.