Git Product home page Git Product logo

10steps.js's Introduction

10steps.js

Pre-defined animations using 10 animation steps, based on the work of this 2 guys:

Daniel Eden http://daneden.me/animate/

Louis Remi http://louisremi.github.com/jquery.transform.js/index.html

Included animations
- Bounce
- Shake
- Tada
- Swing
- Wobble
- Wiggle
- Pulse
- Bounce in
- Bounce in up
- Bounce in down
- Bounce in left
- Bounce in right
- Lightspeed in
- Roll in
- Roll out

Usage

  1. Download and set the jQuery transfrom plugin from http://louisremi.github.com/jquery.transform.js/index.html

  2. Change these 2 vars to fit your needs
    var $element = $('.myClass'); // your jQuery selector
    var chosenFx = 'rollOut'; // the effect name camelCased

$element.animate(fxPattern[0], fxPattern[1], fxPattern[2]); // wherever you want it to be triggered

If you want to override/add an effect, you can just do the following:

fx.myNewEffect = {
step0: 'your transform effect at 0%',
step1: 'your transform effect at 10%',
step2: 'your transform effect at 20%',
step3: 'your transform effect at 30%',
step4: 'your transform effect at 40%',
step5: 'your transform effect at 50%',
step6: 'your transform effect at 60%',
step7: 'your transform effect at 70%',
step8: 'your transform effect at 80%',
step9: 'your transform effect at 90%',
step10: 'your transform effect at 100%'
}

That's it.

Example

var $element = $('.myClass');
var chosenFx = 'bounceInRight';
// let's bind it to some button
$('.myButton').on('click', function() {
$element.animate(fxPattern[0], fxPattern[1], fxPattern[2]); // wherever you want it to be triggered
});

10steps.js's People

Contributors

skelogh avatar

Watchers

 avatar James Cloos avatar  avatar

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.