I have a portion of a form that "pops" out of it's normal place, and binds itself to the side of the viewport. When this happens, certain elements are hidden, leaving me with only the data that is immediately critical.
My problem is that I can't seem to get the copied data into only those cells with matching classes that DO NOT contain data.
I'm fairly certain the problem lies in my JS:
$('.spec-table-quote-button').click(function() {
var toCopy = $(this).closest('tr').find('td:eq(1)').text();
var copyInto = $(".part-number-input").val('');
$(copyInto).val(toCopy);
$('.add-field').click();
});
Here's a fiddle to see all the pieces: http://jsfiddle.net/UjPAk/
Any help is greatly appreciated. Many thanks in advance!