JQuery anonymous function not firing
<p>JQuery newbie. </p>

<p>With this code the alert for '2' works, but never the alert '1'.
I can switch around the order and get the same result, and JQuery must be loaded otherwise neither would work.  So whats the problem with the declaration of the anonymous function?</p>

<pre><code>    &lt;script type="text/javascript"&gt;
        $(document).ready(function () {
            alert('1');
        });

        $(document).ready(
            alert('2')
        );
     &lt;/script&gt;
</code></pre>
