Enable Disable Controls in a table row

jquery

Solution

$(document).on('change','.chkView',function(){
var row = $(this).closest('tr');
    if($(this).is(':checked'))
    {           
      $(row).find('.chkEdit,.chkDelete').prop("disabled",false);    
    }
    else
    {
      $(row).find('.chkEdit,.chkDelete').prop("disabled",true);     
    }
});

You are missing '.' in the selector class.

Demo:

http://jsfiddle.net/J6TN8/2/

Problem

I would like to enable the edit&delete checkboxes of that row, when the respective chkView is checked and disable them if it is unchecked. This code is not firing at all in the first place. Where am i going wrong. http://jsfiddle.net/75rVH/1/ HTML ``` <table id="table_forms"> <tr> <td><input type="checkbox" class="chkView"/>View</td> <td><input type="checkbox" class="chkEdit" disabled/>Edit</td> <td><input type="checkbox" class="chkDelete" disabled/>Delete</td> </tr> <tr> <td><input type="checkbox" class="chkView"/>View</td> <td><input type="checkbox" class="chkEdit" disabled/>Edit</td> <td><input type="checkbox" class="chkDelete" disabled/>Delete</td> </tr> </table> ``` JS: ``` $(document).on('change','.chkView',function(){ var row = $(this).closest('tr'); if($(this).prop("checked",true)) { $(row).find('.chkEdit').prop("disabled",false); $(row).find('.chkDelete').prop("disabled",false); } else { $(row).find('.chkEdit').prop("disabled",true); $(row).find('.chkDelete').prop("disabled",true); } }); ```

Original source