Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda