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
#html
#css
#beginners
#tutorial
๐คซ 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 โบ๏ธ