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);
//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);