jQuery plugin that adds a fading "back to top" button to a page.
Include the production file after jquery.
<script src="/path/jquery-latest-version.js"></script>
<script src="/path/jquery.scrolltop.button.min.js"></script>
Create a div element
<div id="my_button"></div>
Initialize the plugin
$(window).load(function() {
$('#my_button').scrollTopButton();
});
Scrolling distance from the top at which the button appears. Deafult: 300
Scrolltop duration. Default:500
Apply your custom css styles for the button. Default: 0
$(window).load(function() {
$('#my_button').scrollTopButton({
scrollHeight : 800,
scrollDuration : 1000,
customCss : 1 // Define your custom styles for the button in your css file
});
});