How to Easily Add Smooth Scrolling to Your Website - JavaScript Tutorial
Vložit
- čas přidán 11. 07. 2024
- It's easy to add smooth scrolling to your existing website using JavaScript. This can be done by using a range of methods - covered in this video include scrolling an element into view, a specific position on the page or relative to the current position.
For your reference, check this out:
developer.mozilla.org/en-US/d...
🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
🎨 Download my VS Code theme - marketplace.visualstudio.com/...
💜 Join my Discord Server - / discord
🐦 Find me on Twitter - / dcodeyt
💸 Support me on Patreon - / dcode
📰 Follow me on DEV Community - dev.to/dcodeyt
📹 Join this channel to get access to perks - / @dcode-software
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript
I learn so many new tricks from you pls dont ever stop ❤❤ I watch all the ads so you don’t have ever to work again
this small piece of code is very useful...thank you very much for this
Mine doesn't smoothly scroll. Do I have to do that hack in the Chrome flags? This seems to be a widespread issue so I'm curious how you're doing it.
No! This is a BAD video/advice/whatever. You don't want to steal a SYSTEM scroll. If you want a macOS scroll feel - buy a Mac, but don't steal the native and give the user this shitty parody.
You clearly have no idea how these API's are used. Think scroll based animations using interserctionObserver() or even a scroll to sign up/ form/ contact ect... You're not hijacking the users ability to scroll....
Appreciate the feedback - just to clear up these methods are called programmatically like for example in a response to an event on the webpage.
"macOS scroll feel"