Take the 2-minute tour ×  I use a lot of jQuery, so I have to
keep typing out the $(document).ready function to put the jQuery
code. Is there a shorter form of the function?  share|improve
this question Why are you making lots of $(document).ready()
blocks? Only initialization code that's referencing the DOM on
first page load needs to be in such a block. You can also puts
lots of pieces of code in one $(document).ready() block. – 
jfriend00 Oct 27 '11 at 4:55 The answers below are clear, but
it's also spelled out pretty clearly within the jQuery doco for
document ready. –  nnnnnn Oct 27 '11 at 5:29 add comment  2
Answers  up vote 13 down vote accepted  The three following
syntaxes are allowed:  Syntax 1   Syntax 2   Syntax 3
Additionally, from version 1.9 onwards:  $(window).on('load',
null, function) $(document).on('ready', null, function)
share|improve this answer +1 Very nice answer. Welcome to Stack
Overflow! –  Paul Sasik Oct 27 '11 at 4:48 There is also
$(document).bind("ready", handler) (though tha