JQuery - Clone View [object Object]
I am using clone to copy an input and when viewing it on the page I get [object Object].
I clone it as follows:
- var clonado =$('#Descripcion').clone();
And I visualize it as follows:
- var nuevaFila = "<tr>";
- var clonado =$('#Descripcion').clone();
- nuevaFila += "<td>" + clonado + "</td>";
- $("#orderdetailsItems").append(nuevaFila);
And displaying it comes out [object Object] instead of cloned input. I have tried to put cloned.html () and I no longer get [object Object], but I get empty.
To prove that the cloning is correct I have put the following instruction and it clones it perfectly.
- $('#orderItems').append(clonado);
But what I need is that he does it to me is to put it inside the td as I am concatenating it in new row.
Greetings and thank you.