denidip2015-03-23 10:26:12
denidip, 2015-03-23 10:26:12

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:

      $panel = $("#panel");
      $menu = $("#menu");

.qqw {
  transform: translate3d(206px, 0px, 0px)!important;
  -webkit-transform: translate3d(206px, 0px, 0px)!important;
  transition: -webkit-transform 700ms, transform 700ms;

A transition is assigned to the qqw class, so everything appears smoothly and beautifully, but how to hide the socket so that the transition is also applied, tell me the design? In general, there is an idea to write a transition inline, and change it to another class, but something has not worked out so far ((

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Nikolay Talanov, 2015-03-23

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;

65536, 2015-03-23

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() {

mr_dev1l, 2015-03-23

Does it appear on hover or on click?
If on hover, then try this:

$panel.toggleClass( "qqw", 1000, "easeOutSine" );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question