Dialogs

Dialogs are similar to pages except their border is inset to give them the appearance of a modal dialog. jQuery Mobile is quite flexible in regards to how we can style our dialogs. We can create confirmation dialogs (see Figure 2–9), alert dialogs (see Figure 2–10), and even action sheet styled dialogs (see Figure 2–11, Figure 2–12).

images

Figure 2–9. Confirmation Dialog (ch2/dialog.html)

images

Figure 2–10. Alert Dialog (ch2/alert.html)

We can transform a page into a dialog at either the link or page component. On a link, add the data-rel="dialog" ...

Get Pro jQuery Mobile 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.