3 ms·
You don't have to use $(document).ready() anymore As far as I know, this was always the case. The reason people use $(document).ready() is that it feels more
by Xurinos 16y ago
You don't have to use $(document).ready() anymore
As far as I know, this was always the case. The reason people use $(document).ready() is that it feels more correct, is more consistent. jQuery() supports three distinct behaviors:
$(function) => jQuery(document).ready(function)
$(objects) => Wrap objects with jQuery functionality
$("selector") => Find objects, and wrap them with jQuery functionality
One of these is not like the others.