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>
|
</code></pre>
|
||||||
<p>And use it like this:</p>
|
<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
|
// or
|
||||||
animateCSS('.my-element', 'animate__bounce').then((message) => {
|
animateCSS('.my-element', 'bounce').then((message) => {
|
||||||
// Do something after the animation
|
// Do something after the animation
|
||||||
});
|
});
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -51,10 +51,10 @@ const animateCSS = (element, animation, prefix = 'animate__') =>
|
||||||
And use it like this:
|
And use it like this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
animateCSS('.my-element', 'animate__bounce');
|
animateCSS('.my-element', 'bounce');
|
||||||
|
|
||||||
// or
|
// or
|
||||||
animateCSS('.my-element', 'animate__bounce').then((message) => {
|
animateCSS('.my-element', 'bounce').then((message) => {
|
||||||
// Do something after the animation
|
// Do something after the animation
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue