Need to add one column while inserting a row from another table
Hi friends,
I am just adding one row from table1 to table2 using jquery.
While copying need to add two columns dynamically and then insert into table 2.
How to do that please help me . i have shared my piece of code here in jquery
-
$(
".addSubject").
click(
function() {
var
html =
$(
this).
closest(
"tr").
clone().
find(
'td:last').
remove().
end().
prop(
'outerHTML');
//$('addSubject').append(`<tr>${$(this).closest('tr').html()}</tr>`);
//$(this).remove();
$(
".scenario").
append(
html);
});
Here addSubject is my table1 and scenario is my table two.
In the place of grade in scenario table need to append one column wtih select box