I think the point there was that if you have a lot of setup to do, try to defer as much as possible past `.ready()` so that the user will have something to look at.
However, if you wait until the `load` event happens, the page is visible and the user can start interacting with it. If you're still messing with the HTML at that point it can be pretty confusing for the user. That's really common with pages that decide for example to AJAX back for saved settings; they can yank the defaults out from under you while you're typing! The southwest.com site does that and it drives me crazy.
None of the recommendations should be seen as absolutes, and some conflict with each other. For example, if you're using event delegation you've got to be careful in caching selectors to content that may go away.
Comments
So is it generally agreed that $(window).load() should be used over $(document).ready() in most cases?
I think the point there was that if you have a lot of setup to do, try to defer as much as possible past `.ready()` so that the user will have something to look at.
However, if you wait until the `load` event happens, the page is visible and the user can start interacting with it. If you're still messing with the HTML at that point it can be pretty confusing for the user. That's really common with pages that decide for example to AJAX back for saved settings; they can yank the defaults out from under you while you're typing! The southwest.com site does that and it drives me crazy.
None of the recommendations should be seen as absolutes, and some conflict with each other. For example, if you're using event delegation you've got to be careful in caching selectors to content that may go away.