jQuery on() event only working with $(document)
<p>I'm using jQuery's <code>.on()</code> event handler and it's only working when I use <code>$(document)</code>.</p>

<p>This works:</p>

<pre><code>$(function() {
    $(document).on("click", ".search .remove", function(e) {
        console.log("clicked");
    });
});
</code></pre>

<p>This does not work:</p>

<pre><code>$(function() {
    $(".search .remove").on("click", function(e) {
        console.log("clicked");
    });
});
</code></pre>

<p>Nothing happens on that second one...no errors or anything. It just doesn't fire.</p>
