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

120
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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