You have written:
$('document').ready(function(){
// code...
});
This is not the correct way to bind the document ready event in jQuery. $('document') creates a jQuery object with a literal string "document", which doesn’t reference the actual DOM document. The correct syntax is:
$(document).ready(function(){
// code...
});
You have written:
This is not the correct way to bind the document ready event in jQuery. $('document') creates a jQuery object with a literal string "document", which doesn’t reference the actual DOM document. The correct syntax is: