I have a set of checkboxes that have a data-groupid and data-multichoice attributes.
group 1 : data-groupid= "1" data=multichoice="0" (10 boxes)
group 2 : data-groupid= "2" data=multichoice="0" (10 boxes)
How to I disable all boxes on one group at once?
//function will catch any click on any checkbox with class=lvl
$('.lvl').click(function () {
//check if box was checked
if ($(this).is(":checked")) {
//check if data-attribute is NOT a multi-choice
if (!($(this).data("multichoice"))) {
//disable all checkboxes that have the same group-id
$(this).data("groupid") ... HELP HERE
}
}
});