Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Add shift-click selection to a list of checkboxes.
Ruby CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec/javascripts
vendor/assets/javascripts
.gitignore
.travis.yml
Gemfile
Gemfile.lock
README.md
Rakefile
eligo-rails.gemspec

README.md

Eligo

Add simple shift-click multi-select to a list of checkboxes.

Build Status

Installation

Eligo is packaged as a gem that can be dropped into a Rails 3.1 app thanks to the asset pipeline. Add the eligo-rails gem to your Gemfile:

gem 'eligo-rails'

The JavaScript file shift_clickable is now available to require and use.

<ul>
  <li>
    <input type="checkbox">
    Arthur Dent
  </li>
  <li>
    <input type="checkbox">
    Ford Prefect
  </li>
  <li>
    <input type="checkbox">
    Tricia McMillan
  </li>
  <li>
    <input type="checkbox">
    Zaphod Beeblebrox
  </li>
</ul>
#= require shift_clickable

$ -> $('ul').shiftClickable()

Clicking on Arthur and then shift-clicking on Zaphod will also select both Ford and Tricia.

Something went wrong with that request. Please try again.