replace innerhtml along with events
<p>I would like to replace the innerhtml of thisOne with that of either clone1 or clone2.</p>

<p>I have figured out how to replace the entire thisOne element with that of the clone, but would rather not do it that way as I store data in the li element.</p>

<p>I also have figured out how to put a separate div tag around the clones innerhtml, clone(true) that redundant tag element, and append the redundant tag and its innerhtml into thisOne, but these seems like a waste of a tag.</p>

<p>I also find that html() doesn't bring over the events, and would rather not re-declare them each time I swap the html.</p>

<p>Any suggestions?  Thank you</p>

<pre><code>&lt;ul&gt;
&lt;li id="thisOne" data-attr="whatever"&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ul style="display: none"&gt;
&lt;li id="clone1"&gt;
&lt;a href="#" class="doSomething1"&gt;Click&lt;/a&gt;
&lt;button class="doSomething3"&gt;Click&lt;/button&gt;
&lt;/li&gt;
&lt;li id="clone2"&gt;
&lt;a href="#" class="doSomething2"&gt;Click&lt;/a&gt;
&lt;button class="doSomething4"&gt;Click&lt;/button&gt;
&lt;/li&gt;
&lt;/ul&gt;

....

$("clone1 a").click(function(){alert("hi");});
</code></pre>

<p>The following new code added doesn't appear to work.</p>

<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;title&gt;Dialogs&lt;/title&gt;
&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js" language="javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function(){    
    $("#cloneIt").click(function(){$('#newLocation').html($('#clone').html());});
    $("#clone a").on("click", function(){alert("click");});
    $("#clone select").on("change", function(){alert("change");});

});
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;input type="button" value="Clone it" id="cloneIt" /&gt;

&lt;div id="newLocation"&gt;&lt;/div&gt;

&lt;div id="clone" style="display: none"&gt;
&lt;a href="#"&gt;Click Me&lt;/a&gt;
&lt;select&gt;&lt;option&gt;Hello&lt;/option&gt;&lt;option&gt;Goodby&lt;/option&gt;&lt;/select&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
