The jQuery Mobile framework triggers page change events whenever a page is loaded by the
$.mobile.changePage() method into the DOM. The
pagebeforechange event is fired first, before the page changes. Then, either the
pagechange event (on success) or the
(on failure) is fired. This recipe shows you how to use the page change events.
Copy the full code of this recipe from the
code/08/pagechange sources folder. You can launch this code using the URL
Carry out the following steps:
main.htmlwith two links to open two dialogs and an empty
divelement in its page content, as follows:
<div id="content" data-role="content"> <a href="#dialog1" ...