If I use "on" with jQuery do I need to include this function inside a document ready?
<p>I have the following:</p>

<pre><code>$("#menu, #home").on('click', 'a', function() {
    //  javascript code
 });
</code></pre>

<p>But it's not inside a document ready? Will it still work okay even if the #menu or #home are not yet part of the DOM? </p>
