Joined July 2012
·

Edmund Kump

Grinding in NYC, living in CT
·
·
·

Posted to Don't use .live in jQuery over 1 year ago

@rquinlivan Thanks for the comment. I certainly believe you should use on() where applicable, but it shouldn't be used as a simple replacement for ready(). Unless I’m mistaken, Even if your handler isn't manipulating the DOM the browser has to stop to download, parse, and execute your JavaScript before it can continue to load the rest of the DOM. Depending on your situation, you can actually degrade perceived performance by using on(). Obviously, if you need an event handler to be available before ready() fires then on() is the right choice. But, I think in many situations it’s best to load your JavaScript after everything else, and do stuff after the DOM is ready.

Posted to Me, my self and that over 1 year ago

I believe the accepted convention is "that"

http://javascript.crockford.com/private.html

Achievements
634 Karma
59,428 Total ProTip Views