How to use two events in one `.on` jQuery code

The first argument to on() can be a space-delimited string of the event names, instead of an object:

$(document).on('mouseleave mouseenter click', '.MyDivs', sameOperation);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top