Тёмный

How to Create an Active Nav Link on Scroll using HTML CSS and Javascript | Active Menu Class 

Codehal
Подписаться 158 тыс.
Просмотров 122 тыс.
50% 1

How to Create an Active Nav Link on Scroll using HTML CSS and Javascript, Active Menu Class Javascript, Navbar Active on Scroll Javascript, Active Navbar Javascript, How to Make Active Navbar in HTML
Click For More: / @codehal
Source Code:
codehalweb.com/
-------------------------------------------------------------------
🔔 Subscribe Now!
/ @codehal
Related Videos:
Animated Navigation Menu Bar using HTML CSS | Animated Tabs with Indicator
• Animated Navigation Me...
Animated Navigation Bar in HTML and CSS | Menu Hover Animation Effects
• Animated Navigation Ba...
CSS Underline Animation Navbar | CSS Navigation Menu Bar
• CSS Underline Animatio...
Codehal
-------------------------------------------------------------------
#css #cssanimation #csseffect #codehal
-------------------------------------------------------------------
Disclaimer video is for educational purpose only. Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.

Опубликовано:

 

25 мар 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@delmontee
@delmontee 6 месяцев назад
Great article, thanks. If you want to have the URL hashtag update as you cycle through, add something like " linkid='X' " to each a href, then add an onclick event to each link, where the parent.location.hash changes to the whatever the linkid attribute is . If you want to then add that in to the url's page history, use window.history.pushState(..... then the user can navigate back to previous sections via the back button.
@SilakhulMufid
@SilakhulMufid 7 месяцев назад
I finally found what I was looking for.... Thanks dude
@alinagrinmn
@alinagrinmn 11 месяцев назад
Thank you for the great video! Have been looking for a right and smooth solution for a couple of days.
@coders-rabbi
@coders-rabbi 11 месяцев назад
perfectly working. This is an amazing video.😘
@DiogoLScarmagnani
@DiogoLScarmagnani Год назад
Your channel is a piece of cake! Thank you for too many things you're sharing with us, I'm learning a lot! My best regards from Brazil. 🇧🇷
@codehal
@codehal Год назад
Glad to help 💚
@williamoliveira8123
@williamoliveira8123 Год назад
Que legal encontrar outros brasileiros que gostam desse canal.
@solongdygaming4729
@solongdygaming4729 6 месяцев назад
You're very good at explaining
@surajramani5279
@surajramani5279 9 месяцев назад
it's a very helpfull for me....Thanks 👍
@souvik_745
@souvik_745 13 дней назад
It helped a lot. Thank you so much 😊
@excorific2205
@excorific2205 Год назад
Amazing work. Simple yet impactful and full of knowledge. Thank you so much I need to leave a comment expressing my gratitude.
@codehal
@codehal Год назад
Thank you! That's absolutely fine
@user-lb6ez4ul9y
@user-lb6ez4ul9y 3 месяца назад
Many many thanks brother❤❤❤❤❤❤
@jaimecadenas8495
@jaimecadenas8495 Год назад
Muchas gracias, por compartir... comprendido
@allahmacedo1993
@allahmacedo1993 9 месяцев назад
Obrigado , me ajudou bastante .
@abdullahjama8404
@abdullahjama8404 3 месяца назад
thanks appreciate the help.
@sange7512
@sange7512 Год назад
This is what I find thanks
@ICARO7
@ICARO7 Год назад
Muito boa a explicação 😊✌️ Deus abençoe!
@DLXXXI
@DLXXXI 2 месяца назад
Do i need to use section or can i use div to
@maharshi5555
@maharshi5555 9 месяцев назад
If I put "top >= offset - 98 (height of header), then only it is perfectly working with complete scroll to the section...Any suggestion?
@abhishekdubalgonde
@abhishekdubalgonde 10 месяцев назад
😇cool thank you soooo much
@ayouby12
@ayouby12 Год назад
Thank you
@youtubechannel548
@youtubechannel548 3 месяца назад
Cool, but what if all sections are not 100vh? If all sections are 100vh it's easy, but what do you do if they are not?
@WawanSetiawan-sh8kv
@WawanSetiawan-sh8kv 10 месяцев назад
This amazing
@pagalpk
@pagalpk Год назад
Lovely song in starting
@the_sahil_patil
@the_sahil_patil Год назад
Can we do this using php instead of js?
@eothay
@eothay Год назад
Responsivo, responsive?
@Kau_Ram
@Kau_Ram Год назад
Lots of love bro
@codehal
@codehal Год назад
Thanks awfully!
@MansiChovatiya
@MansiChovatiya 7 месяцев назад
I wanted to express my sincere gratitude for the invaluable knowledge and insights I've gained from you. Your guidance has been instrumental in my growth, and I deeply appreciate the opportunity to learn from your expertise.🥳
@milanigp
@milanigp Месяц назад
This is great video works absolutely fine. But there is one more issue. When I click on the nav link, the page scrolls to top of the page, and my page is hiding under the navbar. So content of the page hides by header. How can we add the header offset so clicking on the nav link scrolls to just after the header? Can anyone have this problem and can suggest what we can do for this?
@Nimurasa
@Nimurasa 6 месяцев назад
When I try to write the code you have writed in this video, when I reach the JavaScript where you add the active and section in document.querySelectorAll, I have added the entire JavaScript code, but the active button won't toggle when I view different sections.
@pictor4690
@pictor4690 4 месяца назад
Same
@amitsevda4723
@amitsevda4723 Год назад
Amazing work❤❤❤
@codehal
@codehal Год назад
Thank you 💚
@Argylleagen
@Argylleagen 7 месяцев назад
The logic starts @ 6:30
@reatasu
@reatasu 4 месяца назад
can I use this in my website?
@ikiruu4333
@ikiruu4333 2 месяца назад
@Codehal the onscroll and scrollY doesnt work...
@colommbiano
@colommbiano 18 дней назад
How can you do the same but using react?
@aman12988
@aman12988 10 месяцев назад
Brother, " *window.onscroll* " property is not working. I had to use " *window.addEventListener("scroll" , )* " instead to make it work.. But I still couldn't figure out why * .onscroll* didn't work, can you please tell why it didn't work, has it gone deprecated or something, or any other issue..??
@zaindevs
@zaindevs 4 месяца назад
Yoe have to use window.scrollY ...
@oct-zt2hk
@oct-zt2hk 2 месяца назад
This was single page website but if we have multi page website how make active link in that case ???
@Garden_of_Words.
@Garden_of_Words. Месяц назад
Pretty sure you can do: a:is(:link, :active, :visited).active { color: white; background-color: black;}
@user-jh2ii5os9w
@user-jh2ii5os9w 15 дней назад
How to put a text inside it broo if i put text its not inside
@vedad_1335
@vedad_1335 2 месяца назад
I didnt apply java script and its stilll working hmm
@cezar5875
@cezar5875 Год назад
0:16 how to make this effect when double click on the text
@baazigar5
@baazigar5 11 месяцев назад
by pseudo element ===> ::selection{ }
@Light---Yagami
@Light---Yagami Год назад
@kira3821
@kira3821 9 месяцев назад
it works for the first 5 section, but it doesnt work on the last lmao
@user-ou7on2os6n
@user-ou7on2os6n 8 месяцев назад
@aman12988 @aman12988 1 month ago Brother, " window.onscroll " property is not working
@zaindevs
@zaindevs 4 месяца назад
bro use window.scrollY property ... it works
@ikiruu4333
@ikiruu4333 2 месяца назад
window.scrollY doesn't work either
Далее
3D Portfolio Website | HTML CSS & Javascript
1:36:31
Просмотров 177 тыс.
I need your help..
00:28
Просмотров 5 млн
Khabib came to check on Poirier 👀 #UFC302
00:25
Просмотров 767 тыс.
Active Nav Link Indicator with Vanilla Javascript
5:56
How to create a CSS navigation bar in 6 minutes! 🧭
6:28
Make Nav Link Active For Each Page With JavaScript
13:58
Subtle, yet Beautiful Scroll Animations
5:04
Просмотров 1,6 млн
How to Create Navbar in HTML and CSS
6:15
Просмотров 197 тыс.