Fix function usage on docs. Fix #1075

This commit is contained in:
Elton Mesquita 2020-06-19 16:11:26 +01:00
parent 1fcabbd95e
commit de12ea8a64
2 changed files with 4 additions and 4 deletions

View File

@ -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) =&gt; {
animateCSS('.my-element', 'bounce').then((message) =&gt; {
// Do something after the animation
});
</code></pre>

View File

@ -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
});
```