Handling page events
Now that we've discussed physical type events, it's time to turn our attention to page container events. Remember that jQuery Mobile has its own concept of a page container that represents the space where pages are loaded and are working with the current page. In order to give developers even more control over how pages work within jQuery Mobile, numerous page events are supported. Not all will necessarily be useful in your day-to-day development. In general, page events can be split into the following categories:
- Load: These are events related to the loading of a page. They are
pagecontainerbeforeload
,pagecontainerload
, andpagecontainerloadfailed
. Thepagecontainerbeforeload
event is fired prior to a page being requested. Your code can either approve or deny this request based on whichever logic may make sense. If a page is loaded, thenpagecontainerload
is fired. Conversely,pagecontainerloadfailed
will be fired on any load that does not complete. - Change...