How can I disable only a single check box in a table row? I have my for condition in a phtml file. My html has one td for my checkbox, but if I click on one check box it disables all the checkboxes in a table. Below is my for loop with check box.
<?php
foreach($this->rows as $record)
{
echo "<tr>";
echo "<td >". $record['firstname'] . "</td>";
echo "<td>".$record['advicetoowners'] . "</td>";
echo"<td>".$record['customdata'] . " <br /> ".$record['reservation'."</td>";
?>
<td class='stylecontent'width='2' >
<input type="checkbox" name="seen" value="" class='chkAll'/>
</td>
<?php
}
?>
My jQuery is:
$('.chkAll').change(function() {
// This disables all the check box in a table.How to make it to disable only one
$('input:checkbox').attr('disabled', this.checked);
});
change this to
this