O'Reilly logo

jQuery Mobile: Develop and Design by Kris Hadlock

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

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 ...

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