An open API service indexing awesome lists of open source software.

https://github.com/theswedishdev/animatecss-helper

A JavaScript helper for animate.css
https://github.com/theswedishdev/animatecss-helper

animatecss animation css helper javascript javascript-helper

Last synced: 7 days ago
JSON representation

A JavaScript helper for animate.css

Awesome Lists containing this project

README

          

# animate.css-helper

## What is this?
A simple promise-based JavaScript helper for [Daniel Eden's](https://github.com/daneden) [Animate.css](https://github.com/daneden/animate.css). By including a small script you can animate certain DOM elements from JavaScript.
The script will add two classes; `animated` and the specified animation's name, when the animation is done these two classes will be removed from DOM elements to not cause a pain in the backside.

## Installing
```bash
$ git clone https://github.com/theswedishdev/animatecss-helper
```

## Usage
### Including it in your project
Include animate.css
```html

```
Include the script
```html

```

### Add animation to a DOM element
```js
document.querySelector("#demo").animateCss("tada").then(function(element) {
console.log("Done animating", element);
});
```

### Add animation to multiple DOM elements
```js
document.querySelectorAll(".demo").animateCss("tada").then(function(elements) {
console.log("Done animating", elements);
});
```

## License
[MIT](LICENSE) © [Joel Ericsson](https://github.com/theswedishdev)