Can someone please explain to me the difference between
Notice that there are no quotes within the first document block.
$(document) passes the document element to JQuery.
$('document') passes the CSS selector 'document' to JQuery.
Neither is necessary as the ready method in jQuery should no longer be called directly.
You should either use:
and so run the code straight away without needing to test ready.
thank you for the detailed explanation
This topic is now closed. New replies are no longer allowed.