How to reset an event handler after calling .off() in Jquery
问题 Why is my second body.on() not working? I added the .off() because if not both mousewheel events triggered with only one mousewheel down event... Isnt the second body.on() supposed to reset the .off()? How should I program this? $(document).ready(function() { $("body").on('mousewheel', function(event, delta) { if (event.deltaY < 0) { if (!$(".both").hasClass('rotated')) { $(".both").css('transform', 'rotate(180deg)'); setTimeout(function() { $(".both").addClass('rotated') }, 1000); } } $(