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

119
Vistas
Jquery Event on div creation or content change

I have a form, with the following div created when there is an error on the email field when we submit the form. Meaning the div doesn't exist is the original form.

<div for="email_rappel" generated="true" class="mage-error" id="email_rappel-error">
'Please enter a valid email address.'</div>

I would like to make an event when the div is created..in order to do that, I've tried the following; but seems like nothing is triggered the log never happens and can't tell why.

        var emailError = jQuery('#email_rappel-error');
        emailError.bind('DOMNodeInserted DOMSubtreeModified DOMNodeRemoved', function(event) {
            console.log("test");
            if(emailError.text() === "'Please enter a valid email address.'"){
                //do something
            }
        });

Any suggestion ?

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