dyScrollUpJS
Small plugin that you can use in your website and blog to create "Scroll-to-top" button using dyScrollUpJS.
This documentation is for version 1.x of dyScrollUpJS project.
Click here to get the latest release for the GitHub repository.
dyScrollUpJS needs jQuery v1.8 or above. Download jQuery from their website.
Download the latest release version of dyScrollUpJS from its GitHub repository. Unzip the folder and you will get the following.
From the css folder get the minified stylesheet dyscrollup.min.css file. And from the js folder get the minified javascript dyscrollup.min.js file. Inside the image folder we get some sample images.
dyscrollup.min.css
dyscrollup.min.js
Put the stylesheet in the head tag.
head
≶link rel="stylesheet" href="/path/to/dyscrollup.min.css" />
Include jQuery and dyScrollUpJS JavaScript files in the body tag generally at the end and then you can write some JS to initialize the plugin.
<!-- first jQuery --> <script type="text/javascript" src="/path/to/jquery.min.js"> <!-- next dyScrollUpJS --> <script type="text/javascript" src="/path/to/dyscrollup.min.js"> <!-- finally dyScrollUpJS initialize code --> dyscrollup.init();
The init() method of dyScrollUpJS takes an object as parameter. Following are the properties and their respective values that you can set.
init()
<!DOCTYPE html> <html> <head> <title>Index Page</title> <link type="text/css" rel="stylesheet" href="css/default.css"> <!-- dyscrollup style --> <link type="text/css" rel="stylesheet" href="css/dyscrollup.min.css"> </head> <body> <!-- put your content here --> <!-- javascript --> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/dyscrollup.min.js"></script> <!-- init dyscrollup --> <script type="text/javascript"> dyscrollup.init({ showafter : 600, scrolldelay : 1000, position : "left", image : "image/32.png", shape : "other", width : 30, height : 30 }); </script> </body> </html>