Skip to content

A simple jQuery plugin that let users go back to the top of a web page.

Notifications You must be signed in to change notification settings

xiqingxl/jquery-goup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Peasy

Download the minified version of the plugin, include it after jQuery and:

<script type="text/javascript">
$(document).ready(function(){

$.goup();

});
</script>

Demo

Yeah! You can see a live demo here: http://ryuk87.github.io/jquery-goup/

Options

In this first version there are a few options that you can use to make this little thing suits your needs:

  • location : "right" or "left". On wich side the thing will be shown (default is "right");
  • locationOffset : integer. How many pixels separates the thing from the edge of the screen (based on the location setted) (default is 20)
  • bottomOffset : integer. How many pixels separates the thing from the bottom edge of the screen (default is 10);
  • containerRadius : integer. Make you transform a square in a circle (yeah, it's magic!) (default is 10)
  • containerClass : string. Don't you like the name i chose? You can change it! (I'm a little sad though...) (default is "goup-container")
  • arrowClass : string. Read above. (default is "goup-arrow")
  • trigger : integer. After how many scrolled (down obviously) pixels the thing must be shown. (default is 500)
  • animationSpeed : "slow", "normal", "fast". The speed at which the user will be brought back up (default is "slow")
  • hideUnderWidth : integer. The threshold of window width under which the thing is permanently hidden (default is 500)

Changelog

v0.1.5 (04-06-2014)

Added width threshold (hideUnderWidth) to hide the button on small screens.

v0.1.0 (04-05-2014)

Initial Release

License and Copyright

jQuery GoUp! is dual licensed under the GPL and MIT licenses.

(c) 2014 Daniele "Ryuk87" Lenares

About

A simple jQuery plugin that let users go back to the top of a web page.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%