jScrollPane plugin for Rails
A Ruby gem that uses the Rails asset pipeline to include the jScrollPane plugin by Kelvin Luck and Tuukka Pasanen:
This gem was created in 2013 and since then it has been downloaded more than 41k times. I'm glad you guys found it useful! However, it's time to move on. Rails 6 uses Webpacker as a de-facto standard to bundle assets therefore this gem became redundant for setups that utilize Webpacker or other bundlers like esbuild. Moreover, Rails 7 is coming in December 2021 and this new version uses another modern approach: you can rely on jsbundling-rails and choose your favourite bundler (Webpacker, esbuild, rollup). Basically, it means that it's not recommended to install front-end packages as Ruby gems anymore.
Another thing to mention is that jScrollPane itself was abandoned by its maintainer: there were no stable releases for years.
Therefore, jscrollpane-rails is officially deprecated since December, 2021. Version 2.2.4 is the final release I'm going to roll out: it is tested with Rails 7 so it should still work fine with older setups. But once again: it's very much recommended to migrate to jsbundling-rails or Webpacker.
Thank you for your attention, and hopefully you'll find my other solutions useful.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install jscrollpane-rails
This is a jQuery plugin so you will also need the
jquery-rails gem (for instance, Rails 5.1 does not have this gem by default anymore):
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
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
application.js you will need to add this line:
//= require jquery.jscrollpane
And in your
application.scss you will need to add this line:
$ bundle install
$ rake test
- 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
Copyright (c) 2020 Ilya Bodrov-Krukowski