jQuery Mobile pageloadEvent
Examples
Pop up a message after the external page is successfully loaded and inserted into the DOM:
alert("pageload event triggered!");
});
Try it Yourself »
Definition and Usage
Deprecated after version 1.4.0, usepagecontainerloadinstead.
The pageload event is triggered after the page is successfully loaded and inserted into the DOM.
Related events:
- pagebeforeload- Event triggered before any loading
- pageloadfailed- Triggered after the page fails to load.
Note:When an external page is loaded into the DOM, two types of events are definitely triggered: the pagebeforeload event before loading, and the pageload (successful load) or pageloadfailed (failed load) event after loading.
Syntax
| Parameters | Description |
|---|---|
| function(event,data) | The function specified to execute after the pageload event is triggered This function contains the following two parameters: Event object- Includes any jQuery event properties (event.target, event.type, etc.). For more information, seejQuery Event Reference Manual Data object- Contains the following types:
|

More Examples
Demonstration of related events.
Demonstration of the pageload and pageloadfailed events.
Event object
Use the event.type property to return the type of event triggered.
Data object
Use data.url to return the URL of the external page.
Other Extensions
jQuery Mobile Events