Skip to content

Instantly share code, notes, and snippets.

@tristen
Created May 2, 2012 21:30
Show Gist options
  • Save tristen/2580665 to your computer and use it in GitHub Desktop.
Save tristen/2580665 to your computer and use it in GitHub Desktop.
loading: function(state) {
var spin;
var opts = {
lines: 17,
length: 5,
width: 4,
radius: 20,
rotate: 90,
color: '#000',
speed: 2,
trail: 100,
className: 'spinner',
top: 'auto',
left: 'auto'
};
var target = document.getElementById('viewport');
switch(state) {
case 'start':
spin = Spinner(opts).spin(target);
break;
case 'stop':
spin.stop();
break;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment