Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 380 Bytes

File metadata and controls

19 lines (13 loc) · 380 Bytes

Section 6.6: Document Loading Event .load()

If you want your script to wait until a certain resource was loaded, such as an image or a PDF you can use .load() , which is a shortcut for shortcut for .on( "load", handler).

  • HTML
<img src="image.jpeg" alt="image" id="image">
  • jQuery
$( "#image" ).load(function() {
  // run script
});