"It doesn't look like your background color changed" error, but background IS changing


#1

My code is this

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

and the background color is changing but still its saying -

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


6/12 Hover?
#2

Hi Adishri22,

Could you please post a link to the exercise you're on?

Also, try removing the space here:

$('div' )

:slight_smile:


#3

Hover over the div for about 3 seconds, the full length of the animation, then it worked for me.


#4

Yeah you were right...it worked for me now :slight_smile:


#5

you just have to remove the the space ('div') this will work for you


#6

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