.ready()

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 »
  Javascript Tutorial »
    jQuery Reference »
      Event
Javascript Tutorial Event
Event
Event attributes
event.keycode
event.clientX/clientY
pageX/pageY
Cancel event
Event target
bind
.blur()
.change()
.click()
.error()
.dblclick()
.delegate()
.die()
.focus()
.hover()
.keydown()
.keypress()
.keyup()
.live()
.load()
.mousedown()
.mouseenter()
.mouseleave()
.mousemove()
.mouseover()
.mouseout()
.mouseup()
.off()
.on()
.one()
.ready()
.resize()
.scroll()
.select()
.submit()
.toggle()
.trigger()
.triggerHandler()
.unbind()
.undelegate()
.unload()