retrieve objects own tag
<p>I am using jQuery to sort a list of li tags, My current code is:</p>

<pre><code>var arr = [];
$("ul li").each(function() {
    arr.push($(this));
});
arr.sort(cmpFunction);
$("ul").find("li").remove();
$.each(arr, function(index, item){
    console.log(item.html());
});
</code></pre>

<p>What i'm finding with the console.log though - is I am losing the outside containing li tag (with the html5 data attributes that I want to keep)</p>

<p>Is there another option to .html() that will give me the objects li tag as well</p>

<p>I have provided a simple example of what I need here: <a href="http://jsbin.com/esalas/5" rel="nofollow">http://jsbin.com/esalas/5</a></p>
