Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A spinning activity indicator for Rails 3.1

tree: 5ee7ed9341

Fetching latest commit…

Cannot retrieve the latest commit at this time

lib
vendor
.gitignore initial
Gemfile initial
README.md
Rakefile initial
spinjs-rails.gemspec
README.md

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

or as jQuery plugin:

// application.js

//= 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
});

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

License

MIT by @dnagir.

Something went wrong with that request. Please try again.