fgnass / spin.js

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

Help with stopping spinner #329

Closed drfunk2458 closed 6 years ago

drfunk2458 commented 7 years ago

I can't seem to stop your spinner either... Here is my code... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Spin Test
//do something important here..............

other options I tried:

neyanderson commented 7 years ago

I've the same issue, but using IE8 .

fgnass commented 7 years ago

The spinner can be stopped like this: $('#spinner').spin(false)

IvanYurchenko commented 7 years ago

Not sure if it helps but I did it like this and it worked:

    function showSpinner() {
        // Spinner configuration
        var opts = { lines: 13, length: 26, width: 12, radius: 36, scale: 0.5 };
        var target = document.getElementById('spinner');
        var spinner = new Spinner(opts).spin(target);

        return function() {
            spinner.stop();
        };
    }

    // Show spinner and store function that stops it
    var stopSpinner = showSpinner();

    ...
    // Call the function to stop the spinner
    stopSpinner();
singhswat commented 5 years ago

Stopping the spinner seems to be a challenge... With @IvanYurchenko IvanYurchenko I could stop the spin but Modal i.e. the background is till faded... can someone please guide on how to make it disappear on a response is received from ajax? Shipment