O'Reilly logo

Visualforce Development Cookbook by Keir Bowden

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

Working with dialogs

While mobile applications can utilize the standard JavaScript alert function to create a dialog, this can be a jarring user experience, as the dialog will not be styled according to the application and the pop-up aspect may be at odds with the page transitions used elsewhere. jQuery Mobile provides the following two mechanisms for generating a dialog:

  • A page that has a <div> element with a data-role attribute of dialog will only ever be rendered as a dialog and thus, is not as re-usable as the second method explained next.
  • A link to a page with a data-rel attribute of dialog renders the target page as a dialog. This allows the target page to be rendered as a regular page or a dialog depending on the use case.

In this recipe we ...

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