JavaScript - How to Add Smooth Scrolling Anchor Links to Jump to a Specific Part of a Web Page

preview_player
Показать описание
In this tutorial you'll learn how to scroll up or down a website using an anchor link with JavaScript.

Sponsor me on GitHub!

Follow my blog:

Рекомендации по теме
Комментарии
Автор

This video deserves way more likes simple and straight forward, thanks.

destinyobamwonyi
Автор

looking forward for more awesome content like this😍

MuhammadHassan-qhsm
Автор

Thank you! This tutorial helped me so much!

ayla
Автор

thank you very much sir, it made my concept clear

MuhammadHassan-qhsm
Автор

The easiest method to turn on smooth scroll I've ever seen. LIKE !

UNIWORKER
Автор

This is EXACTLY what I needed! Thank you so much!!! *** It doesn't smooth scroll on mobile? How come??? ***

jordanaldrich
Автор

man thank you alot for sharing your knowledge with us this helped me so much again thank you for this quick and easy to use content<3

Amirhosseindev
Автор

How do I add custom scroll duration?, thanks

tomaspaiva
Автор

Using your codepen I cant find a difference between this and the css

html{
scroll-behavior: smooth;
}

let me know if you can thanks!

firedforfighting
Автор

Thank you for sharing this tutorial. I have a question. On my website are anchor points. So thats working fine. But i to smoothly automatic scroll to a section, without clicking on the anchor points. So when somebody starts scrolling with the mouse, the next section smoothly scrolls in viewpoint. How can i do that?

karinwillekes
Автор

Hi, i do it with a transition (css only). Why would it be better this way?
What happened to the other challenges? There are 12 of 25. They are very good, it continued like this ...

juanpedrotrionfini
Автор

What is that "^" you used between the href and the "#"?

mitsyleague
Автор

once I implement this if I add any other pages links in href it is not working..

ipsitsaha
Автор

on mobile its not working as we expect. any solution ?

Ramkirat
Автор

Why wouldn't you use the scroll-behaviour: smooth; css property tho? Loading in excessive js is nonsensical imo.

CulturalToast
Автор

Man I just find like this project, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, very much.

hollywoodexplained