Wednesday, October 9, 2013

Alternate for jQuery's $(document).ready ()?

jQuery's $(document).ready() is one of most used functionThis function is executed when the DOM is fully loaded.

The $()function provides a shortcut for us as this is a common task. When we pass in a function as the argument to $(), jQuery performs an implicit call to .ready(). Hence we can use the following shortcut:


$(function(){
    // Your Code
});
                  


 

in place of $(document).ready().