I need to disable all the check boxes inside a table cell when clicking on a hyperlink inside the same table.
I\'m using the following jquery code to select all the
Your code can be a lot simpler:
$el = $(this).parents('table:eq(0)')[0].children('input[type="checkbox"]');
Could be:
$el = $(this).parents('table:first :checkbox');
Then to disable them:
$el.attr('disabled', 'disabled');
or to check them:
$el.attr('checked', 'checked');
or to uncheck them:
$el.removeAttr('checked');
or to enable them:
$el.removeAttr('disabled');