How does jQuery's new on() method compare to the live() method in performance?
问题 jQuery has a new method called on() that is recommended to replace delegate() , live() , and .bind() . For example, using both methods: $('#some-button').on('click', function() { //do something when #some-button is clicked }); $('#some-button').live('click', function() { //do something when #some-button is clicked }); Which one performs better? (I do know that both of these event contexts are at the document level.) 回答1: As I understand .live() and .on() , the two examples you have included