Re:Don't wait for "DOM ready" for your app to start
by voidfiles on Saturday June 09, 2012 @01:09AM
(#4087263)
So, the code you post requires jQuery, I am assuming, because you don't say. Which means you would need to also include jQuery in the header. Doesn't that seem like a waste? Also if you had jQuery already you could probably writing a queuing system for almost all actions, and not just "important" ones.
You should take a queue from Flickr. I took a look at how they handled this, and I think it's one the best I have seen so far.
You should take a queue from Flickr. I took a look at how they handled this, and I think it's one the best I have seen so far.
http://dailyjs.com/2011/11/28/flickr-async/
The method there could actually be a small amount of code, and wouldn't require that you load jQuery before queuing events.