Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptex committed May 25, 2018
1 parent 0acb976 commit 880982a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,25 @@ new AnimateMe('.animate-me', {
});
```

## Destroy animations / event listeners

If you want to stop AnimateMe, there are two ways to do so:

1. Calling `unbind` on the instance will remove all event listeners which will cause your animations to stop working.
2. Calling `destroy` will remove all event listeners and all CSS classes set to your elements, effectively restoring their initial state.

Example:

```javascript
const instance = new AnimateMe();

// Remove event listeners but keep the CSS classes
instance.unbind();

// Remove event listeners and the CSS classes
instance.destroy();
```

## Demo

There is a simple demo illustrating how the AnimateMe library works.
Expand Down

0 comments on commit 880982a

Please sign in to comment.