Dear bosses:
I have a piece of js code that uses jquery’s animate method. I need to
monitor the movement of the mouse wheel when this code is running. If there is The movement of the mouse wheel will exit this animate method. Please tell me how to write the code?
Attachment:
window.onload = function () { setTimeout(autorollup,3000); function autorollup(){ $("#part2").animate( {top: "-=800px"}, 8000); }
Thank you for your enlightenment!
http://xf0c11m.cn/ Paipai.com View online
Just add event listening, window.addEventListener("wheel", callback function);