jQuery Mobile pagecontainerbeforeload event
Examples
Before requesting loaded pop-up message:
alert ( "pagecontainerbeforeload event trigger!");
});
try it"
Definition and Usage
pagecontainerbeforeload event fires before requesting loaded.
Related events:
- pagecontainerload - After successfully loaded and inserted into the page DOM trigger
- pagecontainerloadfailed - page request failed trigger
Note: This event is used for external page - a page is loaded and inserted into the DOM, 2 events will be triggered. The first event is pagecontainerbeforeload, the second event may be pagecontainerload or pagecontainerloadfailed.
grammar
$("document").on("pagecontainerbeforeload",function(event,data){...})
parameter | description |
---|---|
function (event, data) | have to. Specifies the event is triggered after the execution. This function has two optional parameters: event object - it contains jQuery event properties (eg: event.target, event.type, etc.), See jQuery Events Reference Manual for more information. data Object - contains the following:
|
More examples
Related events Demo
pagecontainerload and pagecontainerloadfailed event instances.
event objects
Use event.type property to return the type of trigger event.
data objects
Use data.url return URL address of the external page.