Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
jQuery mousewheel event - javascript equivalent

I'm using a mousewheel / wheel event to zoom in/out on my page. When I call it with el.on("mousewheel DOMMouseScroll", functionName) jQuery handler, it runs smoothly and everything works fine, event.delta has consistent values.

On the other hand, when I call the same function with el.addEventListener("wheel", functionName), the scroll is all over the place, sometimes it triggers, sometimes it doesn't, event.deltaY changes the sign depending on how it feels at the moment, unrelated to the direction of my wheel.

Is there a way to achieve the smoothness of the jQuery event without loading the whole library only for that single purpose? How would I go about writing/finding the equivalent?

Solved: The event wasn't causing the stutter, event.deltaY property was. Javascript wheel property event.wheelDeltaY is the equivalent to jQuery's event.delta.

Object documentation Thank you @CBroe

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!