For each of my .cloned fields, I'd like to (txtA/txtB) = txtC
Write out the answer to textfield C.
<table>
<tr>
<td><input type="text" id="txtA" name="txtA"></td>
<td><input type="text" id="txtB" name="txtB"></td>
<td><input type="text" id="txtC" name="txtC" readonly="readonly" tabIndex="-1" value=""></td>
</tr>
</table>
JS:
// Clone table rows
$(function() {
var i = 1;
$("#txtA").change(function() {
$("table tr:first").clone(true).find("input").each(function() {
$(this).val('').attr('id', function(_, id) { return id + i });
$(this).val('').attr('name', function(_, id) { return id + i });
}).end().appendTo("table");
i++;
});
// JQuery Math function
});