Easy Tutorial
❮ Jq Sel Firstchild Sel Input Selected ❯

jQuery load() Method

jQuery Event Methods

Example

Alert text when all images are loaded:


Definition and Usage

The load() method adds an event handler to the load event.

The load event occurs when the specified element has been loaded.

This event is applicable to any element with a URL (such as images, scripts, frames, iframes) and the window object.

Depending on the browser (Firefox and IE), the load event may not be triggered if the image is cached.

Note: There is also a jQuery load() AJAX method. Which method is called depends on the parameters.


Syntax

Parameter Description
function Required. Specifies the function to run when the specified element has finished loading.

More Examples

Display some text when all images are loaded

Alert text when the entire page is loaded


jQuery Event Methods

❮ Jq Sel Firstchild Sel Input Selected ❯