iOS Style Checkboxes for Rails 3.1
This gem provides an easy way of using iOS style checkboxes.
Install
Please be sure to have Rails Assets Pipeline enabled.
Add the following to your Gemfile
, preferably inside the assets group:
gem 'ios-checkboxes'
gem 'jquery'
Then as usually:
$ bundle install
Usage
After installation, all you need to do is to require ios-checkboxes
inside JavaScript/CoffeeScript and CSS files.
Usually you would add this to your app/assets/javascripts/application.js
file:
This will also automatically require jquery
.
And also update your app/assets/javascripts/applications.css
to inlude ios-checkboxes
That's it. Now you can write stuff like $(".on-off").iphoneStyle()
.
Development
- Source hosted at GitHub. See
rails
directory. - Report issues and feature requests to GitHub Issues
To update the gem with the latest files do:
cd rails
rake update
git add .
git commit -m 'update rails gem'
rake release