Exersize "hover" of Jquery.my code is true.but send me Error.....please Fixed.tnx for your website


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

<do not remove the three backticks above>

#2

my Eror :Ops try again.it doesnt look like your background-color changed, is your hover adding the class active?
my code:$(document).ready(function(){
$(‘div’).hover(
function(){
$(this).addClass(‘active’);
},
function(){
$(this).removeClass(‘active’);
}
);
});


#3

Have a closer look…

$(‘div’).hover(
               function(){ $(this).addClass(‘active’); }
               ,
               function(){ $(this).removeClass(‘active’); }
 ); /<<<<<<<what is this doing ????
               });

https://api.jquery.com/hover/
https://forum.jquery.com/topic/what-is-the-opposite-of-hover


#4

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