Adding functions with jquery replace() markup
<p>I have a jquery replace() putting in list items that I want to attach a function to. I don't know exactly how to do this though.</p>

<pre><code>function replaceListItems(){ $('ul.options').replaceWith('&lt;ul class="options"&gt;&lt;li class="btn"&gt;&lt;img src="btn.png" /&gt;&lt;/li&gt;&lt;/ul&gt;');}
</code></pre>

<p>Here's the function I'd like to attach:</p>

<pre><code>$("ul.options li").click(function(){myFunction()});
</code></pre>

<p>Seems like it gets removed if I assign it before the list items gets replaced/created.</p>

<p>Thanks in advance for the help!
-m</p>
