Timeline for Difference between .on('click') vs .click()
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 17, 2014 at 9:47 | history | edited | andreister | CC BY-SA 3.0 |
added 576 characters in body
|
Apr 16, 2014 at 10:45 | comment | added | Adriano |
@andreister : correct me if I'm wrong but I believe that another advantage is the usage of namespaces when using on('click' ...) , see stackoverflow.com/a/3973060/759452 ie. on('click.darkenallothersections' ...) and at the same time have on('click.displaynextstep' ...) , then I can unbind only the one I choose using .unbind('click.displaynextstep')
|
|
Apr 10, 2014 at 1:40 | vote | accept | Ben G | ||
Dec 1, 2013 at 1:10 | comment | added | Matthew | What about: $('button.alert').on('click', function() { alert(1); }); ? | |
Aug 9, 2012 at 7:52 | history | answered | andreister | CC BY-SA 3.0 |