jQuery - not() not working with newly added class on element
<p>If I click the numbers div, I should get an alert. If I click the clicker, a class of less is added to the numbers div, and any click after that on the numbers div should NOT show the alert, since it now has the class of less. Instead, I still get the alert, as if the less class is not there. What am I doing wrong? </p>

<pre><code>&lt;div id="clicker"&gt;Clicker&lt;/div&gt;
&lt;div class="numbers"&gt;123456789&lt;/div&gt;

$('.numbers').not('.less').on('click',function(){
    alert('should not alert if has class less after clicker');
});

$('#clicker').on('click',function(){
    $('.numbers').addClass('less');
});
</code></pre>

<p><a href="http://jsfiddle.net/MTCjc/1/" rel="nofollow">Here is a fiddle</a></p>

<p>Thanks for the help fellas, I ended up with this:</p>

<pre><code>$('body').on('click', '.numbers:not(".less")', function(){
   alert('should not alert if has class less after clicker');
});
</code></pre>
