I have a table on which I have a hidden line that I clone in order to add new lines dynamically.
var $clone = $('#table-invoicing').find('tr.hide').clone(true).removeClass('hide');
$('#table-invoicing').find('table').append($clone);
Each line have a id and a data-type. The hidden line is set an id ending in 99. I would like to change this id when I clone the hidden line.
I found similar topics, but for some reason I don't manage to include it in my script. When I clone the line, then there is 2 elements with same id, so a selector by id won't work.
I tried :
$clone.$('#invoicing-row-descr-99').attr("id", "newID");
but then it tells me that $clone is not a function.
Any idea ?