I have 3
checkbox, for which I want only 1
checkbox to be checked at a time. below is my fiddle for the html
JS fiddle
I want this to b
How about this - fiddle:
$('input.chk').on('change', function() {
$('input.chk').not(this).prop('checked', false);
});
Edit:
for second part of your question to un-check other checkboxes when selecting parent checkbox
see this fiddle - (as per chat) :
if (!cb.checked) {
$('#trchkOptions input[type=checkbox]').attr('checked', false);
}