I use a clone to dynamically add a new row to the DOM table from a button click event, as shown below. but I want to add the cloned node at a specific row position in the DOM table. I know that I can do this using the paste option, but I want to use this with cloning.
var newNode = tblBody.rows[1].cloneNode(true);
tblBody.appendChild(newNode);
is there any way to insert or add "newNode" to position i, dynamically select, adding it as the last line.
source
share