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

156
Vistas
jQuery progress prevention code stop working

I have this snippet to prevent auto-progress in form on the step where user must select multiple questions. The problem now is that it prevent auto progress, but when user select one of the checkboxes it's impossible to deselect it. It's for a plugin on Wordpress

(function ($) {
jQuery('#tab .question').on('click', function (e) {
    e.preventDefault();
    $target = jQuery(e.target);
    var isChecked = $target.prev().attr('checked');
    if (isChecked) {
        $target.prev().prop('checked', false);
    } else {
        $target.prev().prop('checked', true);
    }
});
})(jQuery);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

//Your code not clear. Just try this below code
(function ($) {
jQuery('#tab .question').on('click', function (e) {
    $target = jQuery(e.target);
    var isChecked = $target.prev().attr('checked');
    if (isChecked) {
        $target.prev().prop('checked', false);
    } else {
        $target.prev().prop('checked', true);
    }
    e.preventDefault();
});
})(jQuery);
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