jQuery click or mouseover function not getting hit
<p>I have the following HTML element:</p>

<pre><code>&lt;a href='#' class='receipt' id='{some id. generated dynamically}'&gt;Receipt&lt;/a&gt;
</code></pre>

<p>I have the following jQuery, to handle a click:</p>

<pre><code>$('.receipt').click(function () {
                alert('hai');
                alert($(this).attr('id'));
            });
</code></pre>

<p>For some reason, when I click....nothing happens. I originally was trying to use <code>mouseover</code>, but I thought I was doing it incorrectly so I tried <code>click</code>. No dice..am I missing something here?</p>

<p><strong>UPDATE - This is how it ended up working, I'm using <code>.live</code> over <code>.on</code> as Jeff B suggested, but I'm sure <code>.on</code> would work just as well.</strong></p>

<pre><code>$('.receipt').live('click', function () {
  alert('hai');
  alert($(this).attr('id'));
});
</code></pre>

<p><strong>UPDATE 2 - <code>.on</code> will be replacing <code>.live</code> in the future, so you should probably use <code>.on</code>.</strong></p>
