Skip to main content
4 events
when toggle format what by license comment
May 23, 2014 at 9:13 comment added jimasp +1 for delegated events: "By picking an element that is guaranteed to be present at the time the delegated event handler is attached, you can use delegated events to avoid the need to frequently attach and remove event handlers." api.jquery.com/on
Feb 3, 2012 at 1:53 comment added nnnnnn @babonk - This doesn't contradict the other answers, because as Interrobang said in the first paragraph .on() can do what .click() does and do what .bind() and .live() do - it depends what parameters you call it with. (Some other answers mentioned this too.) Note though that "Bind to all links inside #whatever" is not what .live() does, it's what .delegate() does. .live() binds to all inside document rather than letting you specify the container. Note also .live() is deprecated from jQuery 1.7 onwards.
Feb 3, 2012 at 1:34 comment added Ben G "Bind to all links inside #whatever, even new ones created later." Isn't that exactly what .live() does? Also, this seems to contradict with the other answers which say that it only has the functionality of .click(), and therefore doesn't apply to future events.
Feb 3, 2012 at 0:30 history answered Interrobang CC BY-SA 3.0