I have a Table that I want to use to copy data from it to another set of fields once a checkbox is selected on the row. It only seems to work when the fir Row is checked.
$(document).ready(function () { $('.check').change(function () { var firstAddress = $('.addressOne').find('input'); var secondAddress = $('.addressTwo').find('input'); if ($(this).find('input[value="Yes"]').is(':checked')) { for (i = 0; i < 6; i++) { $(secondAddress[i]).val($(firstAddress[i]).val()); } } else { secondAddress.val(''); } }); });