Giter Site home page Giter Site logo

Comments (11)

gakimball avatar gakimball commented on August 11, 2024

animateIn and animateOut only apply transitions. To apply an animation, use jQuery's addClass:

$('#element').addClass('wiggle');

I think we can add a method to do this for you, and also give you a callback that fires when the animation is finished, so it can do cleanup work and such.

As for the modifier classes (.slow, .bounceInOut) and so on, apply those as classes on the element, not in the animateIn/out functions.

from motion-ui.

gakimball avatar gakimball commented on August 11, 2024

See: #40

from motion-ui.

ochorocho avatar ochorocho commented on August 11, 2024

Adding the method would be great.

i tried $('#element').addClass('wiggle');, it adds the class to the element but i cant see any animation.

Required css is there:

.wiggle {
  -webkit-animation-name: "wiggle-7deg";
          animation-name: "wiggle-7deg";
}

@-webkit-keyframes wiggle-7deg {
  "40%, 50%, 60%" {
    -webkit-transform: rotate(7deg);
            transform: rotate(7deg);
  }
  "35%, 45%, 55%, 65%" {
    -webkit-transform: rotate(-7deg);
            transform: rotate(-7deg);
  }
  "0%, 30%, 70%, 100%" {
    -webkit-transform: rotate(0);
            transform: rotate(0);
  }
}

@keyframes wiggle-7deg {
  "40%, 50%, 60%" {
    -webkit-transform: rotate(7deg);
            transform: rotate(7deg);
  }
  "35%, 45%, 55%, 65%" {
    -webkit-transform: rotate(-7deg);
            transform: rotate(-7deg);
  }
  "0%, 30%, 70%, 100%" {
    -webkit-transform: rotate(0);
            transform: rotate(0);
  }
}

from motion-ui.

gakimball avatar gakimball commented on August 11, 2024

Oh, that's a bug with the framework; the CSS output isn't quite right. I'm going to get a patch out today if possible that addresses it.

from motion-ui.

ochorocho avatar ochorocho commented on August 11, 2024

OK... thanks a bunch!

from motion-ui.

gakimball avatar gakimball commented on August 11, 2024

Just published 1.0.1 which addresses these issues. Basically the value of animation-name should not be quoted, nor should the percentage values used in keyframes. Pull requests #26 and #28 fixed this.

As for the API changes, we'll track that here: #40

from motion-ui.

jurerick avatar jurerick commented on August 11, 2024

I downloaded now the motion UI using bower, but still not working. even a simple .wiggle class.

I think we need to specify the animation duration property to make it work.

-webkit-animation-duration: 5s

from motion-ui.

ochorocho avatar ochorocho commented on August 11, 2024

@jurerick, i have the same issue still.
i expected motionUi to animate the element when i drop in a class... but it still does not work for me, even when using the latest version. :-/

from motion-ui.

jurerick avatar jurerick commented on August 11, 2024

@ochorocho , I got it working by adding animation duration to the element class

.myelement{
   -webkit-animation-duration: 5s
}

OR
adding the transition duration (.slow, .fast, .linear, etc...) classes available from the motion-ui.css.

Example:

<div class="myelement wiggle slow">My Element</div>

from motion-ui.

ochorocho avatar ochorocho commented on August 11, 2024

@jurerick thanks... works now!

from motion-ui.

gakimball avatar gakimball commented on August 11, 2024

I added a note to the docs that animation-duration must be used in tandem with mui-animate: 040b2f9

from motion-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.