Multiple jQuery events on one element with different functions and target selectors
问题 Is there a way to combine these two methods of handling the event attachment in jQuery? $('selector').on({ mouseenter: function() {}, mouseleave: function() {}, mousedown: function() {}, mouseup: function() {} }); I prefer the previous method but need something like the following to work with "live"-events (the problem is that this will not work if there's a comment between the handlers): $(document).on('mouseenter', 'selector1', function(){}) .on('mouseleave', 'selector2', function(){}) .on(