I need a help, how do I disable it when the first checkbox is selected. The link has an example of what I was putting together.
I need a help, how do I disable it when the first checkbox is selected. The link has an example of what I was putting together.
When the element is clicked, use the checked
property of it to set the disabled
property of the other checkboxes by finding them. Note that you must use the opposite of the boolean value, because you want a negative logic.
$('.check').click(function(){
$(this).closest('td').find('.son').prop('disabled', !$(this).prop('checked'));
});
Make sure you enter the son
class in the checkbox you want to disable.