jQuery Mobile pagecontainerloadfailed event
Examples
And successfully loaded into the DOM after the pop-up text information on the page:
alert ( "Sorry, the requested page does not exist.");
});
try it"
Definition and Usage
pagecontainerload event and successfully loaded into the DOM after the page is triggered.
Related events:
- pagecontainerbeforeload - pre-loaded trigger request
- pagecontainerload - After successfully loaded and inserted into the page DOM 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("pagecontainerloadfailed",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 pagecontainerloadfailed events and presentations.
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.
data objects
When the page does not exist using data.errorThrown return some information.