Skip to content

Instantly share code, notes, and snippets.

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