Removing elements from a clone

Removing elements from a clone

Hi,

I have a block of HTML that I am cloning, as I want to manipulate it to remove an element, so that I can then append that new HTML somewhere else on the page.

E.g.:
  1. <div id="container">
  2.         <p>Some sample text to be filled in later...</p>
  3.         <a id="copy_btn" href="#">copy text</a>
  4. </div> 
Then in the jQuery, I have tried many different ways of removing stuff from that clone, but with no luck. E.g.
  1. var cont = $('#container').clone();
  2. $(cont).remove("copy_btn").appendTo("body");
There are no errors showing up in Firebug, but the html added to the bodu still contains the link with the id "copy_btn".

Is this even possible? The api says that remove() will remove matched selectors from the DOM, so as this is just a set of elements is that the reason? If so, is there a way to achieve this, or would I have to append it somewhere on my page and then perform the manipulation?

Thanks in advance