The Code Works, but I'm Told It's Wrong


#1


https://www.codecademy.com/courses/web-beginner-en-JwhI1/1/2?curriculum_id=50a3fad8c7a770b5fd0007a1#

There seems to be no problems with my code, and it even functions properly when sumbitted/tested (it changes the background color of the boxes) in the preview editor. However, Codecademy leaves the error message:

"Oops, try again. It does't look like your background color changed, is your hover adding the class active?"

I changed the double quotes to single quotes, and I still receive the message. I also followed the instructions fully on the preview editor (hovering over the div). Does anyone know what's wrong with my code? Thanks!

$(document).ready(function(){

  $("div").hover(
    function(){
        $(this).addClass("active");
    },
    function(){
        $(this).removeClass("active");
    }
  );

});


#2

Be sure to follow the instructions on the full page preview.

  1. Click inside the window to give it focus
  2. Mouse over a div and pause for two seconds
  3. Mouse off the div and pause for two seconds
  4. Return to editor

#3

Have the same issue with the same problem.
This is the error code: Oops, try again. Unable to get property '1' of undefined or null reference


#4

have the same issue.


#5

I had the same issue. I eventually got it to work by only putting my mouse into only one of the div's and taking out it.


#6

The same. Will subscribe.


#8

Yup, worked for me!
thanks


#9