Skip to content

Instantly share code, notes, and snippets.

@roykolak
Created August 23, 2011 01:40
Show Gist options
  • Save roykolak/1164105 to your computer and use it in GitHub Desktop.
Save roykolak/1164105 to your computer and use it in GitHub Desktop.
$.fn.spin = function() {
var opts = {lines: 12, length: 5, width: 3, radius: 10, color: '#333', speed: 1, trail: 52, shadow: false};
this.each(function() {
var spinner = $(this).data('spinner');
if (spinner) spinner.stop();
if (opts !== false) {
$(this).data('spinner', new Spinner(opts).spin(this));
}
});
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment