The way jQuery's .clone()
seems to work, once you insert a cloned object somewhere, you cannot insert it again another time without re-cloning the original object. For example, if you do this:
var cloned = $('#elem1').clone();
$('#elem2').after(cloned);
$('#elem2').after(cloned);
Only one copy of elem1
will get copied and the second after
call would have done nothing.
Is there a way to not "clear the clipboard" after using a cloned object? Right now I am making do by cloning the object again before inserting it somewhere. Is there a better way to do this?