vendredi 17 juillet 2015

Cant uncheck checkbox after adding this jQuery

The code is supposed to disable a group of checkboxes. there are two classes of checkbox, if i click on one, it disables the other. the problem is if i change my mind and want to unchoose (uncheck), it does not allow me to uncheck.

$(".single-checkbox").click(function(){
  if ($(this).prop("checked", "checked")) {
    $('.deleteDone').prop('disabled', true);
 } else {
    //$(this).prop("unchecked", "unchecked")
    //$('.deleteDone').prop('disabled', false);     
    //$(".single-checkbox").prop("checked", false);
  }
});

Ive tried various things in the else part of the statement but no luck. Would you have any ideas? there are a couple of questions on unchecking checkboxes and i tried variations in my code but no luck .

any help appreciated. C




Aucun commentaire:

Enregistrer un commentaire