Clone wiki

Scriptaculous Slider / Home

Scriptaculous Slider

This plugin is of fork of the original scriptaculous slider plugin which is not maintained anymore.

It provides helpers for the slider control and works with Rails 2.x.


In your Rails app root, use the following command-line :

cd vendor/plugins/
hg clone

or install it system-wide :

$ sudo gem install scriptaculous_slider

and require it in Rails::Initializer (environment.rb) :

config.gem 'scriptaculous_slider'

You'll need to run:

rake scriptaculous_slider_install 

to install the necessary slider.js file in your public/javascripts folder.


<%= slider_stylesheet %>
<%= slider_field :object, :method, :range => 1..10 %>
<%= slider_element "my_slider", :range => 1..10, :hidden_fields => true %>
<%= slider_element "my_slider", :range => 14..25, :values => 14..25, 
                               :handles => ["my_slider_min", "my_slider_max"], :increment => 10,
                               :sliderValue => [14, 25], :restricted => true, :hidden_fields => true,
                               :onSlide => "function(value) { updateSliderValues(value, 'my_slider') }" %>

slider_element doesn't create hidden field by default but can be force to create one. It can handle Range for values option.

slider_field uses a hidden field internally that gets set automatically when using the Slider.

slider_stylesheet builds a stylesheet for the slider (examine the output and copy/paste to your own CSS files).

To see the full functionality and possibilities of the slider control, have a look at the functional and unit tests provided in the GIT repository, see

For discussion of this plugin use the Prototype / Scriptaculous Google group!


If you want to contribute you should take a look at:

Problems, comments, and suggestions are welcome on the ticket system

Copyright (c) 2008 Nicolas Cavigneaux, released under the MIT license