Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
holyzfy committed Mar 14, 2018
1 parent 659bd07 commit c13b697
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# animation
# Animation

A lightweight JavaScript animation library.
You could use like this [demo](https://holyzfy.github.io/animation/demo.html).
A lightweight JavaScript animation library. You could use like this [demo](https://holyzfy.github.io/animation/demo.html).

## Demo

```js
animation.parallel('#elem-1', 'div.elem-2', document.querySelector('.elem-3'))
.then(function () {
return animation.series(document.querySelectorAll('.demo-xxx'));
})
.then(function () {
return animation.race('#demo-4', '#demo-5');
})
.then(function () {
alert('done');
});
```

## API

Expand All @@ -24,7 +38,7 @@ Returns a promise that resolves as soon as one of the animations of the `targets

#### Parameters

The `targets` property defines the elements to animate.
The `targets` property defines the elements to animate, you can use the flowing types:

- CSS Selectors
- DOM Element
Expand Down

0 comments on commit c13b697

Please sign in to comment.