title: How is the detach method used to make code "less expensive"?
body: <p>While looking up the <code>.detach()</code> jQuery method on the <a href="http://learn.jquery.com/using-jquery-core/manipulating-elements/" rel="nofollow">learn.jquery.com</a> site, under the "Removing Elements" section, I came across the passage below: </p>
  
  <blockquote>
    <p>The .detach() method is extremely valuable if you are doing heavy
    manipulation on an element. In that case, it's beneficial to .detach()
    the element from the page, work on it in your code, then restore it to
    the page when you're done. This limits expensive "DOM touches" while
    maintaining the element's data and events.</p>
  </blockquote>
  
  <p>What would be an example of the "heavy manipulation" on an element and how would detaching an element from a page make the code more efficient? Please show an example of when this is useful.</p>