News for hackers. Stuff that matters.
Re:Differences Between jQuery .bind() vs .live() vs .delegat... by jd on Monday February 06, 2012 @11:27AM (#3557923)
What I really like about the old style bind/live/delegate is that it's so grep-able. The new on()-based API makes it much harder to search through a codebase.

In addition, when you see something like:

    $('.table a').click(function() { ... } )
it immediately looks wrong, because there are probably multiple links in the table. Wrong code that looks wrong is great, because you can then refactor it as you come across it. But now you have to check if a second selector argument is passed to "on", to see if unnecessary event handlers are created.
Re:Differences Between jQuery .bind() vs .live() vs .delegat... by strickjb9 on Monday February 06, 2012 @01:10PM (#3558464)
This is also my biggest grip with the new .on(). I can't quickly look through code anymore since .on() can take on different meanings based on the arguments passed. When jQuery 1.7 was released I commented on this on the release notes page, I wasn't well received. It's refreshing to know that others feel the same way...

http://blog.jquery.com/2011/11/03/jquery-1-7-released/#comme...

Re:Differences Between jQuery .bind() vs .live() vs .delegat... by bdg on Monday February 06, 2012 @01:21PM (#3558511)
You should take a look into event delegation with bubbling, event listeners should be minimal.

http://javascript.info/tutorial/bubbling-and-capturing

http://javascript.info/tutorial/event-delegation