Giter Club home page Giter Club logo

just-animate's Introduction

#JustAnimate Just animate your websites

`Just Animate is an easy to use Animation library that lets you add animations and just move on.

Documentation

Check out the Full Documentation Here

Demos

Getting Started

  1. Include these scripts on your document
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.1.4/web-animations.min.js"></script>
<script src="just-animate-core.js"></script>
<script src="just-animate-animations.js"></script>

Just Animate uses the new Web Animations API in JavaScript. For maximum browser compatibility, this should be included even if your browser supports this new standard.

  1. Call the animation function any of these ways
 Just.animate('fadeIn', '#animate-me')
 Just.animate('fadeIn', document.getElementById('animate-me'))
Just.animate('fadeIn', $('#animate-me'))
Just.animate('fadeIn', function() {
   return document.getElementById('animate-me');
});
Just.animate('fadeIn', [$('input:checkbox'), document.getElementById('#animate-me')]);
  1. Use the player returned from animate to do more advanced things:
var player = Just.animate('fadeIn', '#animate-me');
player.play();
player.pause();
player.finish();
player.reverse();
player.cancel();

Getting Started with Angular 1.x

  1. Include these scripts on your document
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.1.4/web-animations.min.js"></script>
<script src="just-animate-core.js"></script>
<script src="just-animate-animations.js"></script>
  1. Import the JustAnimate module into your application
angular.module('myApp', ['just.animate']);
  1. Inject the service into your controller or directive
angular.module('myApp').controller('myCtrl', function(just) {
  /* logic here */
});
  1. Finally you need to call the animate function
just.animate('fadeIn', '#animate-me');

Full Example

angular.module('myApp', ['just.animate'])
  .controller('myCtrl', function(just) {
    just.animate('fadeIn', '#animate-me');
  });

See Getting Started above for more information

Getting Started with Angular 2.x (with SystemJS)

  1. Include these scripts in the head of the document after systemjs
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.1.4/web-animations.min.js"></script>
<script src="browser/just-animate-systemjs.js"></script>
  1. Import the JustAnimate module into your application and inject the Animate.css animations
import { JustAnimate, animations } from 'just-animate';

JustAnimate.inject(animations.ANIMATE_CSS);
  1. Inject the service into your component and call animate()
import { Component } from 'angular2/core';
import { JustAnimate } from 'just-animate';

@Component({
   template: '<div><button (click)="onClick($event)"></button></div>',
   providers: [ JustAnimate ]
})
class MyComponent {
  constructor(private just: JustAnimate) { }
  
  onClick($event: Event) {
      this.just.animate('bounceIn', $event.target);
  }
}

See Getting Started above for more information

Included animations

The animations in just-animate-animations.js are based on Animate.css. Check out all the animations here on their page!

  • bounce
  • flash
  • pulse
  • rubberBand
  • shake
  • headShake
  • swing
  • tada
  • wobble
  • jello
  • bounceIn
  • bounceInDown
  • bounceInLeft
  • bounceInRight
  • bounceInUp
  • bounceOut
  • bounceOutDown
  • bounceOutLeft
  • bounceOutRight
  • bounceOutUp
  • fadeIn
  • fadeInDown
  • fadeInDownBig
  • fadeInLeft
  • fadeInLeftBig
  • fadeInRight
  • fadeInRightBig
  • fadeInUp
  • fadeInUpBig
  • fadeOut
  • fadeOutDown
  • fadeOutDownBig
  • fadeOutLeft
  • fadeOutLeftBig
  • fadeOutRight
  • fadeOutRightBig
  • fadeOutUp
  • fadeOutUpBig
  • flipInX
  • flipInY
  • flipOutX
  • flipOutY
  • lightSpeedIn
  • lightSpeedOut
  • rotateIn
  • rotateInDownLeft
  • rotateInDownRight
  • rotateInUpLeft
  • rotateInUpRight
  • rotateOut
  • rotateOutDownLeft
  • rotateOutDownRight
  • rotateOutUpLeft
  • rotateOutUpRight
  • hinge
  • rollIn
  • rollOut
  • zoomIn
  • zoomInDown
  • zoomInLeft
  • zoomInRight
  • zoomInUp
  • zoomOut
  • zoomOutDown
  • zoomOutLeft
  • zoomOutRight
  • zoomOutUp
  • slideInDown
  • slideInLeft
  • slideInRight
  • slideInUp
  • slideOutDown
  • slideOutLeft
  • slideOutRight
  • slideOutUp

License

JustAnimate is licensed under the MIT license. (http://opensource.org/licenses/MIT)

Contributing

Pull requests are the best way. If you have an idea, create an issue so we can talk through it.

just-animate's People

Contributors

notoriousb1t avatar notoriousbot avatar

Watchers

 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.