Answer the question
In order to leave comments, you need to log in
How to implement smooth highlighting in jQuery?
there is a css class
.highlighted {
background-color: rgb(0,0,0);
}
$(".topMenu").on("mouseenter", "a", function() {
$(this).animate({
"background-color": "rgb(0,0,0)"
});
});
$(".topMenu").on("mouseleave", "a", function() {
$(this).animate({
"background-color": "rgb(200,200,200)"
});
});
Answer the question
In order to leave comments, you need to log in
1. Create a class in styles
.slow{-webkit-transition: all 1s ease;-moz-transition: all 1s ease;
-o-transition: all 1s ease;transition: all 1s ease;}
.slow:hover{-webkit-transition: all 1s ease;-moz-transition: all 1s ease;
-o-transition: all 1s ease;transition: all 1s ease;}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question