6. Hover. Need Help!


#1



I am stuck on this exercise:

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


I am pretty sure my code works, but I get the error message "Oops, try again. It doesn't look like your background color changed, is your hover adding the class active? ". My first guess is that I'm wrong, so can anybody take a look at my code below, tell me what's wrong, and why it's wrong?

$(document).ready(function(){

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

});


#2

Change the places you have 'div' to this

Then add 'div' in the parenthesis here.

If this helps click the check-box that marks this as the solution plz :smiley:


#3

A post was split to a new topic: 6.Hover


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.