Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmycode committed Apr 7, 2021
1 parent 3fae127 commit 837bdfb
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,47 @@ This is a small (< 1kb) helper plugin for the great [Anime.js](https://animejs.c
- Supports latest Anime.js versions with all options.
- Very small Footprint (~600 bytes).

#### Example 
#### Usage

In the browser:

```html
<script src="/path/to/jquery.anime.min.js"></script>
<script>
// start chaining
$(selector).animejs({
left : '50%',
translateX: '-50%',
background : '#00ff00',
duration: 1000,
}).animejs({
top : '50%',
color : '#fff',
background : '#ff0000',
duration: 1000,
}).animejs({
rotate : 360,
duration: 1000,
})
</script>
```
Or as a NPM dependency:

```bash
# Add the dependency to your project
npm install --save jquery.animejs

# or
yarn add jquery.animejs
```

And then import it in your project:

```javascript
$(selector).animejs({
import 'jquery.animejs'

// start chaining
$('.element').animejs({
left : '50%',
translateX: '-50%',
background : '#00ff00',
Expand All @@ -26,4 +63,7 @@ $(selector).animejs({
})
```

#### Requirements
You need [jQuery](https://jquery.com/) and [Anime.js](https://animejs.com/) installed.


0 comments on commit 837bdfb

Please sign in to comment.