jQuery Mobile pagecontainerloadEvent
Example
Pop up a text message after the page is successfully loaded and inserted into the DOM:
alert("pagecontainerload event triggered!");
});
Try it Yourself »
Definition and Usage
The pagecontainerload event is triggered after the page is successfully loaded and inserted into the DOM.
Related events:
- pagecontainerbeforeload - Triggered before the load request
- pagecontainerloadfailed- Triggered when the page request fails
Note:This event is for external pages - after the page is loaded and inserted into the DOM, 2 events will be triggered. The first event is pagecontainerbeforeload, and the second event may be pagecontainerload or pagecontainerloadfailed.
Syntax
$("document").on("pagecontainerload",function(event,data){...})
| Parameter | Description |
|---|---|
| function(event,data) | Required. Specifies the function to execute after the event is triggered. This function has two optional parameters: event object- Contains jQuery event properties (such as: event.target, event.type, etc.), seejQuery Event Reference Manualfor more information. data object- Contains the following:
|
More Examples
Related event demos
Demonstration of the pagecontainerload and pagecontainerloadfailed events.
event object
Use the event.type property to return the type of event triggered.
data object
Use data.url to return the URL address of the external page.
jQuery Mobile Events