jQuery .live() .bind() .delegate() and why you should use .on()

By 5. Juli 2013 general No Comments

Here is a very useful article with nice visualisation about the functions and bubbling: http://www.alfajango.com/blog/the-difference-between-jquerys-bind-live-and-delegate/

Here is another one:

http://jquerybyexample.blogspot.com/2010/08/bind-vs-live-vs-delegate-function.html

and the follow up how to use .on() and .off()

http://jquerybyexample.blogspot.com/2012/01/how-to-use-jquery-on-and-off-method.html

 

Spoiler:

As of jQuery 1.7 the .live() function is deprecated and .bind() and .delegate() are pointers to the .on() method. So I would recommend to just use .on() in the future…

Leave a Reply