I've seen all three lines of below:
$().ready();
$(document).ready();
$(document.body).ready();
They all work, but which one is really the correct (or better) one to use? Taking in account the usage of the ready() event.
I've seen all three lines of below:
$().ready();
$(document).ready();
$(document.body).ready();
They all work, but which one is really the correct (or better) one to use? Taking in account the usage of the ready() event.
None of these, I use $(function() {})
as it clutters the least, is shortest and very idiomatic.