the code supposed disable group of checkboxes. there 2 classes of checkbox, if click on one, disables other. problem if change mind , want unchoose (uncheck), not allow me 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); } }); i have tried various things in else part of statement no luck. have ideas? there couple of questions on unchecking checkboxes , tried variations in code no luck.
any appreciated.
you setting value instead of checking in if statement.
if ($(this).prop("checked", "checked")) { instead, should check if checkbox checked.
if ($(this).is(":checked")) {
Comments
Post a Comment