jQuery: the difference between "live" and "on" for a function
<p>I was reading <a href="http://stackoverflow.com/questions/8042576/whats-the-difference-between-jquery-live-and-on">this post</a> </p>

<p>and had a question that I didn't think it answered.  Why does this work:</p>

<pre><code>$('#threeButtons').live('click', '.markAsSpam', function() {
     // do some stuff
});
</code></pre>

<p>but this doesn't:</p>

<pre><code>$('#threeButtons').on('click', '.markAsSpam', function() {
     // do some stuff
});
</code></pre>

<p>I see the parameters are different, but I am following the example of how to use .on.  At least as it applies to my example.</p>

<p>My DOM looks like</p>

<pre><code>&lt;div id="threeButtons"&gt;
     &lt;a href="#" class="markAsSpam"&gt;Spam&lt;/a&gt;
     ...
&lt;/div&gt;
</code></pre>

<p>I need to use .live or .on because I am dealing with HTML that appended in the DOM.  Also, my .live example only works the first time. What do I need to make it work on successive tries, without refreshing the page.  I'm using jQuery 1.7 and want to use .on, since .live has been deprecated.</p>
