how to make the checkbox on the table can be checked? I've the code below to add the checkbox dynamically by using a jquery function. The code below succeed to add the checkbox dynamically, but the problem is the checkbox added by the function can't be checked (disabled).
<table id="detail">
<tr>
<td><input type="checkbox" id="cb" name="cb[]"></td>
</tr>
</table>
This is the button to add the row:
<input type="button" id="addRow" value="ADD ROW" />
And this is the jquery function I have:
<script type="text/javascript">
$(document).ready(function() {
$("#addRow").click(function() {
$('#detail tbody>tr:last').clone(true).insertAfter('#detail tbody>tr:last');
});
});
</script>
Anyone can help for the code? Thanks... :)