Sha256: 8e21e3f55596fedfe683633cf04bd63b2228b97fb1750a75f0a58fc5cdb559df

Contents?: true

Size: 1.43 KB

Versions: 5

Compression:

Stored size: 1.43 KB

Contents

# Spin.js - spinner with no CSS, Images

Provides an easy-to-use Rails 3.1 asset for [Spin.js](http://fgnass.github.com/spin.js/)

# Install

Add it to your Rails application's `Gemfile`:

```ruby
gem 'spinjs-rails'
```

Then `bundle install`.


# Usage

Require `spin`:


```javascript
// application.js

//= require spin
```

or as [jQuery plugin](https://gist.github.com/1290439/):

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

// 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](http://fgnass.github.com/spin.js/) site.


# License

[MIT](http://www.opensource.org/licenses/mit-license.php) by [@dnagir](https://twitter.com/dnagir).


# Thanks

Thanks to [all contributors](https://github.com/dnagir/spinjs-rails/graphs/contributors) and the author of the spin.js

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/spinjs-rails-1.4/README.md
spinjs-rails-1.4 README.md
spinjs-rails-1.3 README.md
spinjs-rails-1.2.8 README.md
spinjs-rails-1.2.7 README.md