0

I am learning to code from codecademy.com and one of the jquery lessons did not work properly. I copied it to my webhost to see if I could get it to work there or use the javascript console to figure out the problem but I am stuck.

Here is the script.js page:

$('document').ready(function(){
Uncaught ReferenceError: $ is not defined
    $('div').mouseover(function() {
        $('div').fadeTo('fast', 1);
    });
   $('div').mouseout(function() {
        $('div').fadeTo('fast', 0.5);
    });
});

`

The second line is the error message I am receiving and I can't figure out why. I am using Chromium on Ubuntu if that matters (from the different things I've seen in trying to figure this out, it appears that it does matter for some reason).

If anyone can help me explain this, I would appreciate it.

If you want to see the original page it is at learningtocode.nileriverfoods.com.

Thanks for all your help!

4

1 回答 1

2

您的页面中没有包含jQuery。您需要下载此文件http://code.jquery.com/jquery-1.9.1.min.js或仅引用它。

于 2013-03-09T21:10:56.297 回答