dyScrollUpJS

dyScrollUpJS is a small JavaScript plugin that you can use in your website and blog to create "Scroll-to-top" button.


Created by: Yusuf Shakeel

Click here to watch the tutorial video.

Click here for the documentation.

License

It's free and released under MIT License Copyright (c) 2016 Yusuf Shakeel


Getting Started

Include the JavaScript file in your page.

Call the init() method of dyScrollUpJS to create the scroll-to-top button.

dyscrollup.init();

Configure

Pass the following to configure.

dyscrollup.init({
    showafter: 600,
    scrolldelay: 500,
    position: 'right',
    image: 'path/to/image/32.png',
    shape: 'other',
    width: 30,
    height: 30
});

Where,

showafter: integer

(optional) default: 300, show button after scolling X pixels down

scrolldelay: integer

(optional) default: 500, delay the scrolling up action in milliseconds

position: "string"

(optional) values: "left|right" default: "right"

image: "string"

(optional) values: "path of the image" default: ""

shape: "string"

(optional) values: "other|circle" default: "circle"

width: integer

(optional) default: 32

height: integer

(optional) default: 32


Note!

Version 2.x no jQuery required.

Version 1.x requires jQuery v1.12+


Donate

Feeling generous ♥
Buy me a cup of tea

Donate via PayPal


Copyright © Yusuf Shakeel

MIT License