jQuery $ is not a function in Firefox, works in Chrome and works with $(document).ready()
<p>I'm implementing jQuery in a site and am getting the "$ is not a function" in Firefox when I try to use a selector, but $(document).ready() works perfectly right before it. My code looks like this</p>

<pre><code>&lt;script&gt;
     $(document).ready(function(){
          alert("hi")
     }); // Works fine
     function showDiv(){
          $("#traditionalCC").hide();
     }
     //Throws error
&lt;/script&gt;
</code></pre>

<p>Does anyone know why this happens, and why it works in Chrome and Firefox.</p>
