Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda