Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop the spin.js spinner with jQuery

Tags:

jquery

spinner

just used the cool spin.js (http://fgnass.github.com/spin.js/) with jQuery.

I'm appending the spinner with something like this

$('#students-list td:nth-child(5)').live('ajax:before', function(){
  $(this).append().spin(spinOpts);
});

But can't stop it after an Ajax complete event. How to call stop() method on it ?

Thanks guys !

like image 728
Lina E. Avatar asked Aug 21 '11 10:08

Lina E.


1 Answers

Are you using the jQuery plugin listed at the end of that page? If so do this:

$('#students-list td:nth-child(5)').spin(false);

or

$('#students-list td:nth-child(5)').data('spinner').stop();

To stop it.

like image 87
Hogan Avatar answered Nov 06 '22 19:11

Hogan