Using .not with dynamically added classes in jQuery
<p>I'm using addClass() to add .expanded to an element on click. I then don't want another block of code to match that element anymore. I'm using a combination of .not() and .on() to try and get jQuery to notice the newly added class, but not having much luck - the handler I've written goes something like this:</p>

<pre><code>    $(".person").not("expanded").on({
            mouseleave:...
    });
</code></pre>

<p>Though obviously my .on() syntax isn't correct above, how can I utilise .not() with newly added classnames?</p>
