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

88
Visualizações
jquery hover not working after being moved

I want to make a "catch the button game" so I have to move a button and if I move it the hover event doesn't work anymore. I tried it with normal js but that didnt help either.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

In the Case of the Dynamically added elements, It is better to add the event with the parent element. So you can use 'html' or 'body' tag for that.

.on(events[,selector][,data],handler)

$(document).ready(function () {
    $('html').on('hover', '.btnClass', function () {
        // do you work
    })
}); 
about 4 years ago · Juan Pablo Isaza Relatório

0

Probably because you have a dynamic added element(button). Therefor you need to use the .on using jQuery. ✌️

$(".buttonClass").on("hover", function () {
// your function.
});
about 4 years ago · Juan Pablo Isaza Relatório
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