Closed heaven closed 1 month ago
Using spin.js v4 you can accomplish this yourself with a few lines of code. Add the following rule to your CSS file:
.paused > div > div {
animation-play-state: paused !important;
}
Then the paused state can be togged like this in your JavaScript/TypeScript code (where spinner
is an instance of the Spinner
class):
spinner.el.classList.toggle('paused');
I have slides on the page, they switch with animation. Adding spin.js slows those down. Actually not just slows, they stop working at all. I need an ability to pause spinners before call "animate" on the slides switch and run it again after animation is done.