jQuery .ready() bug?
<p>I'm developing a JS functions to handle it in <code>$(document).ready(...)</code>.
These functions are in file "a.js".</p>

<p>In function "example(TAG_ID)" I call:</p>

<pre><code>console.log( $('#anything').children().length )
</code></pre>

<p>OK. When I include in Application Main Javascrip file: <code>$(document).ready(example(TAG_ID))</code>, is returned: <code>0</code></p>

<p>But. When I include <code>&lt;script&gt;$(document).ready(example(TAG_ID))&lt;/script&gt;</code> after the element whose id is TAG_ID, is returned: <code>7</code> (as it should be)</p>

<p>Description of jQuery.ready() function is: "Specify a function to execute when the DOM is fully loaded."</p>

<p>I think it is not running after the elements are fully loaded... Why?</p>
