Lesson 10: works but have error (Oops, try again...)


#1

newbie to jquery, and code acadamy...

Intro to jQuery, lesson 10. I have the mouse over working fades from light to solid color, but I get a error on save and submit...

Opps, try again, Did you put document inside $()

CODE:
index.html








Click Me!


CSS

div {
height: 60px;
width: 100px;
border-radius: 5px;
//background-color: #69D2E7;
background-color: green;
text-align: center;
//color: #FFFFFF;
color: red;
font-family: Verdana, Arial, Sans-Serif;
opacity: .2;
}

SCRIPT
$(document).ready(function(){
$('div').mouseover(function(){
$('div').fadeTo('fast',1);
});
});

---Can anyone see a problem?

edit, what's the trick on posting HTML code here? is there an escape or sub code for < >


#2

Hi Bmartinftl.

  1. To post code, please wrap it in three backticks (`) and a new line before and after, and it'll show up then :)
  2. CSS doesn't have // comments, it uses /* to open a comment and */ to close it, so you might want to fix that
  3. The exercise wants just the base - leave the ready() parenthesis (()) empty for now, and you'll add the stuff inside them in the next exercises :)