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

118
Visualizações
Prevent Defaults prevents whole document from been clicked

On my web site i listen for clicks on a href and swap my html using ajax using the code below

$(document).on('click','a', function (e){
e.preventDefault();
$.ajax({})
.........
})

but the prevent default prevents me from clicking any other thing on the page until the ajax complete. I am listening to the click on tags while referencing the document as root because if the ajax swaps the content, using just and listening to events on that won't be called because of the changes done by swapping the dom. What can be done to fix this behavior. Thanks

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

0

You should try with id or class intend of element : a that can prevent it I think.

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