jQuery .ready() event

Syntax and Description


$(document).ready(handler) 
$().ready(handler) 
$(handler)

handler is a function to execute after the DOM is ready. Return value is the jQuery object, for chaining purposes.

ready method specifies a function to execute when the DOM is fully loaded.

The .ready() method is typically used with an anonymous function:


$(document).ready(function() {
   $.print('Handler for .ready() called.');
});




















Home »
  jQuery »
    jQuery Tutorial »




Basics
Selector
DOM
Event
Effect
Utilities