remove and appendTo

remove and appendTo

Hi, I think i didn't grasp something very basic...

I've a callback that receives some HTML from a php script (stored in data). the HTML is something like that:
  1. <div>
  2.         <h1>title</h1>
  3.         <p>lalala</p>
  4.         <form .....></form>
  5. </div>
now I want to append every thing beside the form to another div.
  1. $(data).remove('form').appendTo('#mydiv');
what is wrong with this?
thanks a lot