Checkbox does not change when clicked directly on it
- by Matt McCormick
I have a table of data and have one checkbox per row for the user to select the item.
I'm using the following jQuery code to allow the user to select the item by clicking anywhere in the row:
$("tbody tr").click(function() {
var checkbox = $(this).find(':checkbox');
checkbox.attr('checked', !checkbox.attr('checked'));
});
The problem is…