0.05
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
An animated CSS3 loading spinner with VML fallback for IE.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.1
 Project Readme

Spin.js - spinner with no CSS, Images

Provides an easy-to-use Rails 3.1 asset for Spin.js

Install

Add it to your Rails application's Gemfile:

gem 'spinjs-rails'

Then bundle install.

Usage

Require spin:

// application.js

//= require spin

and if you want the jQuery plugin, you also need to add that:

// application.js

//= require spin
//= require jquery.spin

// Then you can:

$(".abc").spin(); // Shows the default spinner
$(".abc").spin(false); // Hide the spinner

// Show customised spinner:
$(".abc").spin({
  lines: 12, // The number of lines to draw
  length: 7, // The length of each line
  width: 9, // The line thickness
  radius: 30, // The radius of the inner circle
  color: '#000', // #rgb or #rrggbb
  speed: 1, // Rounds per second
  trail: 60, // Afterglow percentage
  shadow: false // Whether to render a shadow
});

// Use customisation shortcuts:
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).

See the full usage details on the spin.js site.

License

MIT by @dnagir.

Thanks

Thanks to all contributors and the author of the spin.js