Check for Dynamic Elements Using jQuery
<p>Using jQuery, how can I detect dynamically-inserted elements? Something like this:</p>

<pre><code>$('div#cart').on('mutate', function() {
    // Do something.
});
</code></pre>

<p>It needs to be able to trigger when elements that were not present when the DOM was originally loaded, even elements inserted using Ajax.</p>