jQuery pagecontainerload Event
Alert some text when the external page has been successfully loaded and inserted into the DOM:
alert("pagecontainerload event fired!");
Try it yourself »
Definition and Usage
The pagecontainerload event is triggered after the page has been successfully loaded and inserted into the DOM.
- pagecontainerbeforeload - triggered before any load request is made
- pagecontainerloadfailed - triggered if the page load request fails
Note: These events are used for external pages - Whenever an external page is loaded into the DOM, 2 events are fired. The first is pagecontainerbeforeload. The 2nd event will either be pagecontainerload or pagecontainerloadfailed.
|function(event,data)||Required. Specifies the function to run when the pagecontainerload event occurs.
The function has two optional parameters:
The event object - which can contain any jQuery event properties (e.g. event.target, event.type, etc.) See jQuery Events Reference for more information
The data object - contains the following:
Try it Yourself - Examples
A demonstration of
A demonstration of pagecontainerload and pagecontainerloadfailed.
The event object
Using the event.type property to return the triggered event type.
The data object
Using data.url to return the URL of the external page.
Thank You For Helping Us!
Your message has been sent to W3Schools.