I need to be able to copy a row from one table to the other using jQuery when a checkbox in that row is checked.
I tried using the .clone() method but this had very strange behaviour. Even though the jQuery was specifically targeting rows in the second table, when copied to the first, it could still be targeted. So either clone() is not right or I need to use something else.
$('#offers tbody tr td input.checkbox:not(:checked)').click(function (e) {
var row = $(this).closest('tr');
});
See it in action! http://jsfiddle.net/3BZp4/1/
Clone also SHOULD work for you and not effect future selection:
http://jsfiddle.net/AkVTw/1/
Now with catch for unchecking as per comments:
http://jsfiddle.net/wGGDb/