Hacker News new | ask | show | jobs
by mmuro 5016 days ago
Here's a good summary of what's great about .ready(): http://docs.jquery.com/Tutorials:Introducing_$%28document%29...

Basically, this is what makes it so great: Everything that you stick inside its brackets is ready to go at the earliest possible moment — as soon as the DOM is registered by the browser.

Waiting on the window is actually slower than waiting on the DOM.