More convert jquery object to string
<p>Yes I have see the post <a href="http://jquery-howto.blogspot.com/2009/02/how-to-get-full-html-string-including.html" rel="nofollow">here</a></p>

<p>And I tried that but the problem is, my jquery object looks more like this:</p>

<pre><code>var $foo = $('&lt;ul&gt;&lt;li id="' + line.id + '" label="' + label + '" rel="file"&gt;&lt;a href="#"&gt;' + line.title + '&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;');
$foo.click(function() { openLink(line.url) });
$foo.appendTo($myDiv);
</code></pre>

<p>When $myDiv is fully populated I can do this:</p>

<pre><code>var html = $('&lt;div&gt;').append($('#foo').clone()).remove().html();
</code></pre>

<p>And I will see all of the lovely HTML, but I don't know if the click stuff will be preserved. See, I want to save the entire DOM modification to localStorage so I can retrieve it quickly since it's pretty static. I need to be able to store it and all its attributes, then yank it back out and restore it, clicks and all.</p>

<p>Does that make sense?</p>
