Customizable plugin, smooth scroll up button, on native JavaScript
Up button initialization, call up() function, in your js file, or in html file, inside script tag
The button has standard styles that are specified in the css file, but it can be customized for a specific design by passing parameters to the function.
up();
up({
bottom: '20px',
right: '20px',
width: '45px',
height: '45px',
bg: 'green',
src: 'img/chevron-up-solid.svg',
whenShow: 400,
circle: true
})
Top position, written in quotes, example "20px"
Bottom position, written in quotes, example "5%"
Position to the left, written in quotes, example "2vw"
Right position, written in quotes, example "25px"
Button width, written in quotes, example "45px"
Button height, written in quotes, example "45px"
background color of the button, written in quotes, example "# 000"
The address (URL) of the picture in the button, written in quotes, for example "img / picture.svg"
How long does it take to scroll the page for the button to appear, example 400
If the button should be round, example is true