Skip to content

codesalsa/backTop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BackTop Build Status devDependency Status

A jQuery plugin to create a customisable 'Back to Top' feature for integration with any website.

Installing with Bower

To install backTop with Bower:

bower install backTop

How to use

  • Include <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> just before the </body> tag

  • Include <script src="PATH TO YOUR JS DIRECTORY/jquery.backTop.js"></script> after the jquery include.

  • Include <a id='backTop'>Back To Top</a> within your html <body></body> tag

  • Include <link href="css/backTop.css" rel="stylesheet" type="text/css" /> before the </head> tag.

Minimum setup

$(document).ready( function() {
	$('#backTop').backTop();
});

Example with default options

$(document).ready( function() {
	$('#backTop').backTop({
		'position' : 400,
		'speed' : 500,
		'color' : 'red',
	});
});

Position

To set a position of the Scroll Top Icon top appear when the browser scroll reaches at the specified position. Default position is 400px from the Top.

Speed

To specify the animation speed of the Scroll Top Icon to appear when the page reaches the scroll position.

Color

To specify the color of the Scroll Top Icon from the 4 (Four) predefined colors. - black, white, red, green

Contributing

Please see CONTRIBUTE.md for info on contributing.

Demo

Check out the demo for more style and feature examples.

About

A jQuery plugin to create a customisable 'Back to Top' feature for integration with any website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published