Answer the question
In order to leave comments, you need to log in
How to make smooth removeClass?
Hello! When you hover the mouse, the class is assigned smoothly, but when I remove the mouse, the class disappears instantly. How can I make the class disappear smoothly?
$(".div").hover(function(){
$('.link').addClass('menuh');
}, function(){
$(".link").removeClass('menuh');
});
.menuh {
transition: all 0.4s;
color:red;
}
Answer the question
In order to leave comments, you need to log in
$(".div").hover(function(){
$('.link').addClass('menuh');
}, function(){
$(".link").removeClass('menuh');
});
.link {
transition: all 0.4s;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question