I am trying to use jquery appendTo in order to copy an element into another container.
The object is indeed appended but, it is removed from the source.
Is there a way I can append the element while leaving the source element where it is?
call it copy call it clone call it whatever you feel like.
Here is my current code:
jQuery(document).ready(function()
{
jQuery('#button').appendTo('#panel'); //button should appear ALSO in panel.
});
Close, but not close enough. The code below will
clone()the element and then append it in#panel.Note that it is against standards to have an
IDused twice in the same page. So, to fix this: