BackTop provides a back-to-top functionality for use with your rails application. It will append a back to top icon at the bottom right corner when user scrolls below the top fold.
Dependencies
BackTop depends on the following:
- Ruby on Rails above 3.2.0 (assets pipeline)
- Sass-Rails
- Coffee-Rails
- Font-Awesome-Rails
Installation
Add this to your Gemfile:
gem 'backtop'
and run bundle install
.
Usage
In your application.css
, include the css file:
/*
*= require backtop
*/
In your application.js
, include the js file:
//= require backtop
Then restart your webserver if it was previously running.
Congrats! You now have back to top functionality in your app.
Copyright
BackTop is licensed under the MIT License