Disable checkbox

0

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.

link

    
asked by anonymous 03.02.2015 / 13:49

1 answer

0

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.

    
03.02.2015 / 14:17