I saw there is an answered question about whether there is a difference between using $(document).ready(function(){})
and $(function(){})
(there is
I use $(document).ready(function(){});
despite the additional typing. I just prefer having that in my code to remind me exactly when the code is going to run, and for the ability to search for 'ready' to find those sections. It's the same functionality, and I normally take shortcuts, but in this case I don't.