Am getting bloody from beating my head against the wall. I just want to be able to change the id of a table row that is cloned and appended to a table. This shouldn't be so hard, no?
Here's what I've tried: function addTableRow(table) { var clonedRow = jQuery(table + " tr:last").clone().attr({ id: '13' }) ; jQuery(table).append(clonedRow); return true; } OR function addTableRow(table) { var clonedRow = jQuery(table + " tr:last").clone(); jQuery(clonedRow).attr("id", "13"); //yes, I want the id to be 13 jQuery(table).append(clonedRow); return true; } Neither of the above works. Anyone got any help they can give me, please?