appendTo() will automatically move the matched elements from their current location to the specified container, which seems to be what you want.
You can use after() to insert new content before moving the element:
$("#yourElement").after("<p>Element was there</p>").appendTo("body");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…