JQuery Events - Hover - Why it's wrong?


#1



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


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

i think my code is true, but why am i still srong ?


Replace this line with your code. 
$(document).ready(function() {
$('div').hover(
    function(){
      $(this).addClass('active');
   },
   function(){
      $(this).removeClass('active');
   }
);
});


#2

refresh your browser :slight_smile:
and try 3/4 times

@bitblaster06048


#3

i already try it. it's still wrong


#4

after click on save and submit button
see the instruction beside Back to editor button
Please move your mouse into div.
hover slowly on div
then stay and see the instruction again
please move your mouse out of div
then click Back to editor button.
i think it'll work now :slight_smile:

@bitblaster06048


#5

it's works thank you..
i didn't see the second instruction to leave the div


#6

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