fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

Since I upgrade the script the spin does not stop anymore.. #375

Closed lenamtl closed 4 years ago

lenamtl commented 4 years ago

Hi,

How can I stop the spin?

It was working fine with old version https://jsfiddle.net/lenamtl/gn7jqk45/

Now I'm trying to use it with newer version. For the test I'm using file from https://spin.js.org/spin.umd.js Can anyone tell me which version it is? See my example https://jsfiddle.net/lenamtl/fzdqtg2u/

I'm not using NPM, I don't want to install it for only one JS file... so I just don't which version it is.

Thanks

theodorejb commented 4 years ago

The https://spin.js.org/spin.umd.js file is for the latest version. You should be able to stop the spinner using the stop() method, just as in previous versions. Make sure you're following all the instructions at https://spin.js.org/.

lenamtl commented 4 years ago

Hi, Thanks for the info Have you check my jsfiddle as stop is not working... spinner.stop();

any clue?

theodorejb commented 4 years ago

When starting the spinner you need to assign the instance to the spinner variable: https://jsfiddle.net/xbj95dv1/

lenamtl commented 4 years ago

Ho I see, my bald I forgot spinner = from spinner = new Spin.Spinner(opts).spin(target);

Thanks for your time