I am trying to add rows to my repeater using jQuery using below script.It is working perfect in IE, but not in Firefox, Chrome and Safari.
looks like issue with using of outerHTML. Can someone help me?
function AddRowToTable(table) {
var newRow1 = $(table.rows[table.rows.length - 2].outerHTML);
var myRow = $(table.rows[table.rows.length - 2]);
$(myRow).after(newRow1);
}
outerHTMLis a proprietary standard, unsupported by browsers other than IE. It’s a bad idea anyway — you should almost always just use the DOM nodes and clone them where necessary. Fortunately, jQuery makes this very easy for you.See:
eqcloneafter