Scroll Page to Top
scroll-up is a simple Rails engine for scrolling page to top.
Installation
Add this line to your application's Gemfile:
gem 'scroll-up', '~> 0.0.5'
And then execute:
$ bundle
Usage
require js
//= require scroll-uprequire css
*= require scroll-upif scss, just
@import "scroll-up";Adding dom trigger, it must be jquery selector #scrollUp, example:
a#scrollUp href="#top"
i.fa.fa-chevron-upContributing
- Fork it ( https://github.com/songjiayang/scroll-up/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request