On Github rajchetan / jquery-training
Chetan Raj
$(document).ready({ // jQuery code goes here}) ;
$(function() { // Handler for .ready() called.});
<!doctype html><html> <head> <meta charset="utf-8" /> <title>Demo</title> </head> <body> <a class="foo">Foo</a> <script src="jquery.js"></script> <script> $( document ).ready(function() { $('.foo').click(function() { alert( "Bar"); }); }); </script> </body></html>