Hello 👋 dear techie friends, I am Atul
Yesterday i have made a 🍭 simple scroll to top button with just HTML CSS.

Scroll to top button with just HTML CSS
🚩 Atul Prajapati 🇮🇳 ・ May 29 '22
🤫 Today I have made another scroll to top button with some extra features. HTML + CSS + JQuery
show hide feature
Share your feedback's in comment section, I would love reply :)
Top comments (13)
A few years ago I realized it as a plugin in vanilla.js
insert the following line before the closing body tag:
<script data-color=blue src="scrolltotop.js"></script>
The file scrolltotop.js:
This. ScrollIntoView (smooth) still in need of polyfill for legacy browsers tho
okay why not
Well yes, but better add this one jsdelivr.com/package/npm/smoothscr... and use ScrollIntoView
write your own Polyfill..
okay will do it
Oh that's great, I don't know about this. Thank you very much for sharing :)
Another stab at vanilla:
Modify:
Modify:
Replace:
You don’t need jQuery, try to make the same task with vanilla js
The implementation seen is JQuery dependant, but I do agree that a Vanilla JavaScript implementation would've been more interesting.
Nice Work!
Thanks 😊 dear ☺️