Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>are you using jQuery mobile throughout your app? Or do you want just the dialog box?</p> <p>If you are working with jQuery mobile, you can do this in markup only. Just have a look at the following code; this is the page you want your popup to appear (HTML):</p> <pre><code>&lt;body&gt; &lt;!-- This is your main page --&gt; &lt;div data-role="page"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Page Title&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;!-- This is the link that will open your popup. You can use either a anchor link to an id existing on this page, or you can reference a filename like "popup.html"--&gt; &lt;a href="#popup" data-rel="dialog" data-transition="pop" data-role="button"&gt;Open dialog&lt;/a&gt; &lt;/div&gt; &lt;div data-role="footer"&gt; &lt;h4&gt;Page Footer&lt;/h4&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- This is your popup "page" --&gt; &lt;div data-role="page" id="popup"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;This is your popup header&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; This is your popup content &lt;a href="#" data-role="button"&gt;Do something here&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>I have made a working example at jsfiddle: <a href="http://jsfiddle.net/mwfire/qaNZD/" rel="nofollow">http://jsfiddle.net/mwfire/qaNZD/</a></p> <p>Do not forget to include all scripts and css, explained at "<a href="http://view.jquerymobile.com/1.3.2/dist/demos/widgets/pages/" rel="nofollow">anatomy of a page</a>" section of the documentation.</p> <p>And have (again) a look at the documentation for options: <a href="http://view.jquerymobile.com/1.3.2/dist/demos/widgets/dialog/" rel="nofollow">http://view.jquerymobile.com/1.3.2/dist/demos/widgets/dialog/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload