Possible Duplicate:
What's the difference betweenonandliveorbind?
I’ve been noticing people referring to jQuery’s .on() method to bind events. I looked up the documentation and it seems like it is new as of version 1.7. I was looking around and I was unable to find why I should use it and how it’s different from just .bind(). Can I use .on() all the time now or is it for specific cases?
If anyone has any input or links explaining the difference, I would appreciate it.
You can use
onfor all event bindings now. As the documentation states:You can use it as you would have used
bind:You can also use it as you would have used
delegate: