A ruby gem that uses the Rails asset pipeline to include the jScrollPane plugin by Kelvin Luck (www.kelvinluck.com):
- Homepage: http://jscrollpane.kelvinluck.com/
- Source Code: https://github.com/vitch/jScrollPane
Add this line to your application's Gemfile:
gem 'jscrollpane-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jscrollpane-rails
NOTE: this is a jQuery plugin so you will also need the jquery-rails
gem:
It is also recommended (but is optional) to include jQuery MouseWheel plugin by Brandon Aaron
(https://github.com/brandonaaron/jquery-mousewheel/) to allow people to scroll your content
using their mouse wheel. There is a gem jquery-mousewheel-rails
available:
This is totally optional but you can increase the usability of the mousewheel in nested scroll areas
by including jQuery MouseWheel Intent plugin by trixta and bodrovis.
There is a gem mwheelintent-rails
available:
FOR RUSSIAN SPEAKERS: There is a guide available describing basic usage of jScrollPane: http://www.radiant-wind.com/categories/javascript-css-html/posts/nestandartnaya-polosa-prokrutki-s-pomoschyu-javascript
FOR ENGLISH SPEAKERS: The same guide is now availble in English: http://www.radiant-wind.com/categories/javascript-css-html/posts/creating-custom-scrollpane-using-javascript
In your application.js
you will need to add this line:
//= require jquery.jscrollpane
And in your application.css
you will need to add this line:
*= require jscrollpane
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This plugin is licensed under the MIT License.
Copyright (c) 2014 Ilya Bodrov