This is one of the most useful elements of jQuery!
The jQuery $(document).ready() method completely negates the need to place scripts in the HTML page to avoid errors caused by elements of the page being required by the script but not being loaded.
The $(document).ready() method requires a blind function (a function defined inline with the method and without a name) be used to house the script to be run. Without this function the code would execute as normal as the page loads.
The syntax looks like this:
Now open the jQuery document ready exercise page and work through it.