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:
<div>element with a
dialogwill only ever be rendered as a dialog and thus, is not as re-usable as the second method explained next.
dialogrenders 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 ...