Why does putting jQuery code does not work sometime when placed inside <head> tag
<p>I often find myself in a place where even a simple jQuery code like below -</p>

<pre><code>jQuery(document).ready(function () {
    jQuery("input[type='text']").click(function () {
        this.select();
    });
});
</code></pre>

<p>Does not work when placed inside "head" tag, but moving this snippet just before the end of body tag in master page works fine. Is there any basic JavaScript/jQuery principle which I am missing.</p>
