Uncaught syntax error unexpected token
<p>I am getting the syntax error</p>

<pre><code>Uncaught SyntaxError: Unexpected token (
</code></pre>

<p>from this code</p>

<pre><code>&lt;script type="text/javascript"&gt;
        jQuery(document).ready(function () {

        });
        function($) {
            $(".scroll").click(function(event){
                event.preventDefault();
                $('html,body').animate({scrollTop:$(this.hash).offset().top},900);
            });
        });
&lt;/script&gt;
</code></pre>

<p>What kinds of mistakes produce this Javascript Syntax error?</p>