You'll want to use the clone() method in order to get a deep copy of the element:

  var $button = $('.button').clone();

Full demo:

From the jQuery docs:

The .clone() method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes. When used in conjunction with one of the insertion methods, .clone() is a convenient way to duplicate elements on a page.