Skip to content

Commit

Permalink
Update files/en-us/web/api/animation/overallprogress/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: wbamberg <[email protected]>
  • Loading branch information
chrisdavidmills and wbamberg authored Jan 21, 2025
1 parent 0cd9f90 commit 9f3f148
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion files/en-us/web/api/animation/overallprogress/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ body {

### JavaScript

In the JavaScript, we start off by grabbing references to the {{htmlelement("button")}}, {{htmlelement("p")}}, and {{htmlelement("div")}} elements. We then create an `animation` variable to store the animation in once started, a [keyframes](/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats) array, and an options object containing timing properties:
In the JavaScript, we start off by grabbing references to the {{htmlelement("button")}}, {{htmlelement("p")}}, and {{htmlelement("div")}} elements.

We then create:

- an `animation` variable which will reference the animation, once we've created it
- a [keyframes](/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats) array
- an options object containing timing properties.

```js
const btn = document.querySelector("button");
Expand Down

0 comments on commit 9f3f148

Please sign in to comment.