Skip to content

Instantly share code, notes, and snippets.

@arturovt
Last active July 27, 2019 16:34
Show Gist options
  • Save arturovt/12fe51e64237930f88d62fef8cc50a07 to your computer and use it in GitHub Desktop.
Save arturovt/12fe51e64237930f88d62fef8cc50a07 to your computer and use it in GitHub Desktop.
const progress: HTMLElement = document.querySelector('.progress');
let width = 0;
const widthInterval = setInterval(() => {
width++;
progress.style.width = `${width}%`;
if (width === 100) {
clearInterval(widthInterval);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment