Answer the question
In order to leave comments, you need to log in
Animation on jquery class removal?
Something I can’t google a simple example, maybe I’m entering something wrong, in general there is a leaving panel:
$(document).ready(function(){
$panel = $("#panel");
$menu = $("#menu");
$menu.mouseover(function(){
$panel.addClass("qqw");
});
$panel.mouseover(function(){
$panel.removeClass("qqw");
});
});
.qqw {
transform: translate3d(206px, 0px, 0px)!important;
-webkit-transform: translate3d(206px, 0px, 0px)!important;
transition: -webkit-transform 700ms, transform 700ms;
}
Answer the question
In order to leave comments, you need to log in
Some terrible tips are listed above, I do not advise you to use the standard jQuery methods for animation at all.
In your case, the animation does not work when the class is removed, because it is actually attached to this class. You need to set the transition property on the .panel element itself
.panel {
transition: transform 0.7s;
}
Gentlemen, formulate your questions clearly. Give the information you need, don't give the information you don't need. Where does the panel go, up, sideways, to my grandmother? under what circumstances? On jquery or css after all? Well, yes, you have the qqw class, I didn’t see it right away, this clarifies everything.
maybe you need something like
$("#panelka").bind("mouseout", function() {
$(this).slideUp(200);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question