Please check the below given fiddler.
i want to disable all others when one is checked... that is working as expected on the created fiddler. but when i uncheck the already selected one i want want all of them to be enabled...
something is wrong with what my code. please help me to fix it.
i am also wondering if there anything like on unclick event is available...
below is my code..
$(".session_outcome_chk_list").click(function () {
$('.session_outcome_chk_list').each(function () {
if ($(this).is(":checked")) {
$(this).removeAttr("disabled");
} else {
$(this).attr("disabled", true);
}
});
});
EDIT:
I also require to do the same on page loads, for example on submitting with selection of one checkbox, on formload also it should check weather if one is selected or not and then do the disable.
maging a update scenario of a form where u already have one item selected on page load.