Fix function usage on docs. Fix #1075
This commit is contained in:
parent
1fcabbd95e
commit
de12ea8a64
|
@ -1110,10 +1110,10 @@ element.style.setProperty('--animate-duration', '0.5s');
|
|||
});
|
||||
</code></pre>
|
||||
<p>And use it like this:</p>
|
||||
<pre><code class="language-javascript">animateCSS('.my-element', 'animate__bounce');
|
||||
<pre><code class="language-javascript">animateCSS('.my-element', 'bounce');
|
||||
|
||||
// or
|
||||
animateCSS('.my-element', 'animate__bounce').then((message) => {
|
||||
animateCSS('.my-element', 'bounce').then((message) => {
|
||||
// Do something after the animation
|
||||
});
|
||||
</code></pre>
|
||||
|
|
|
@ -51,10 +51,10 @@ const animateCSS = (element, animation, prefix = 'animate__') =>
|
|||
And use it like this:
|
||||
|
||||
```javascript
|
||||
animateCSS('.my-element', 'animate__bounce');
|
||||
animateCSS('.my-element', 'bounce');
|
||||
|
||||
// or
|
||||
animateCSS('.my-element', 'animate__bounce').then((message) => {
|
||||
animateCSS('.my-element', 'bounce').then((message) => {
|
||||
// Do something after the animation
|
||||
});
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue