Bootscroll

Bootstrap scroll to top button Inspired By Pinterest.

Bootscroll

A scroll to top Button for Twitter Bootstrap . Inspired By Pinterest.

Installation

1-Html :

  <button class="btn  btn-danger Bootscroll" href = "#top" type="button"><i class="icon-arrow-up icon-white"></i>Scroll To top</button>

2-Javascript :

$(document).ready(function () {
    $.scrollUp();
});

Scroll To Top Options :

$(function () {
    $.scrollUp({
        topDistance: 70, // Distance from top before showing element (px)
    topSpeed: 1000, // Speed back to top (ms)
    animation: 'slide', // Fade, slide, none
    animationInSpeed: 600, // Animation in speed (animation of the button) (ms)
    animationOutSpeed: 600 // Animation out speed (animation of the button) (ms)

    });
});

Customise the Button :

To Modify the Button placement , you can refer to the Bootscroll class ; css style can be found in style.css . The default style is :

.Bootscroll {
    bottom: -5px;
    right: 20px;
    height : 80px;
    width : 70px;   
}

Licence

Bootscroll is licenced under the MIT Licence .

Any contribution from Anyone is very welcome.

Contact

Author : Mohamed Mbarki . Twitter : http://twitter.com/mbarki2009 . Git : @mbarki-mohamed .