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

138
Vistas
How to convert a simple jquery plugin to a regular javascript class?

I'm thinking of converting jquery.hoverIntent to a simple ES class. Mainly because it's a pain to use it on a module context. I'm currently loading it as external dependecy for this reason.

I've already found a couple of similar scripts written in es syntax, but they're not exactly the same, the orgininal still being the best, in particular due to event delegation implementation on mouseenter (which is a thing peculiar of jquery, since that event doesn't have bubbling in native ES).

Now, I'm not an expert of jquery's internals, so currently I cannot figure out to transform something that I can call like $(el).hoverIntent(), in something like hoverIntent(el), but keeping same functionalities. What are the main steps?

Could you please point me to the right direction? I promise I'll share the new code once done! :)

Or, another way to ask: could you explain me what the jquery internals are? How do the core of plugins work? So that I'll know what I have to resamble in pure js?

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