The
load
event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window
object.
For example, consider a page with a simple image:
|
$('#image1') .load(function(){ $('#result1').text('Image is loaded!'); }) .error(function(){ $('#result1').text('Image is not loaded!'); }); |
No comments:
Post a Comment