The smooth scrolling effect, helps improve User Experience (UX) while navigating through different locations in a Web Page.

Learn how to add, cross-browser compatible, smooth scrolling to your Web Pages with Vanilla JavaScript.

Table of Contents:
00:00 Introduction
06:45 Approach #1 - window.scrollTo(options)
11:35 Approach #2 - element.scrollIntoView(options)
16:25 Approach #3 - window.requestAnimationFrame(callback) & window.scrollTo(x-coord, y-coord)

Code for this Project: https://codepen.io/Coding_Journey/pen/xyjwpr

Easing Functions: http://gizma.com/easing/

Support the Channel 💙☕🙏
PayPal: https://paypal.me/CodingJourney

Affiliate Links*
Bluehost Web Hosting: https://www.bluehost.com/track/codingjourney/

*By making a purchase through any of my affiliate links, I’ll receive a small commission at no additional cost to you. This helps support the channel and allows me to continue creating videos like this. Thank you for your support!

Suggested Videos:
Responsive Navbar with HTML, CSS and JavaScript: https://www.youtube.com/watch?v=iixuZwga0yo
Smooth Scroll with CSS: https://www.youtube.com/watch?v=6l-9jEhTjUw
JavaScript Loops: https://www.youtube.com/watch?v=rTDAAhUgJZM

Thanks for watching! For any questions, suggestions or just to say hi, please use the comment section below!

Codepen: https://codepen.io/Coding_Journey/
Twitter: https://twitter.com/CodingJrney
Email: codingjourney123@gmail.com

Subscribe 💖
https://www.youtube.com/channel/UCwpH4liYtBSiVXSfL8x2TyQ?sub_confirmation=1

#javascript #ux

Smooth Scroll with JavaScript
1.85 GEEK