Sticky Navigation Bar On Scroll Using Vanilla Javascript | Fixed Navbar on Scroll
HTML-код
- Опубликовано: 20 фев 2020
- Enroll My Course : Next Level CSS Animation and Hover Effects
www.udemy.com/course/css-hove...
------------------
Join Our Channel Membership And Get Source Code Everyday
Join : / @onlinetutorialsyt
------------------
Please LIKE our Facebook page for daily updates...
/ online-tutorial-html-c...
You are making the code more simpler than others. thanks for making things better, easier, and simpler.
A true life saver. Thank you for this tutorial!
Responsive menu bar...
The author is using flexbox in the video. To make it responsive you can start playing with css code like below. Then just remove "display: flex;" from the original header{...} and header ul{...} code sections.
In the code below: If the screen is smaller than 768px, the menu items will stack vertically, else they will be horizontally in line. You can test for more sizes to be more specific when it comes to cell phones and tablets, etc.
@media only screen and (min-width: 100px) {
header, header ul{
display: column;
}
}
@media only screen and (min-width: 768px) {
header, header ul{
display: flex;
}
}
that one u can just adjust to max-width 767
thank you so much, this was exactly what i was looking for, small simple JS projects, with great results! it helps me really a lot. thanks again :D
easy to use and make, tried from other youtubers but smth didn't came out, but after this video i made it. plus as a bonus there is a small piece of animation.
thanks a lot
Seems simple but beautiful and lightweight. Thank you.
Dari indonesia ?
just like you
Incredible tutorial pal... thank you so much!
Finally something I wanted! :)
For those having issues with initial transition. I had the same issue. Just make sure the transition effect is in the right area of the CSS code. I kept putting it in nav when it needed to be in nav li. At least for my code it did. Hope this helps!
Means, where we have to put this
@@chaitalinirgun1426 In "nav li"
@@lonewarrior2445 Thank you. It worked. But can you please explain why it doesn't work on nav? Thank you.
sir people like you are the reason the internet is a good place ty
This is what I need. Thank you
I have bin searching for this sticky nav. it is damnn helpful. Thank U so much. :+1
background music sun k nind aane lagri hai great work man :)
The way he combines Html, Css and javascript is just so clean
I think there is some repeated code in css, but the video is very helpful and simple.
Finally something I wanted! :)
Thank you
Thank you for the tutorial, really helpful!
Wow unbelievable in 3 minutes I salute you
Great one, you did a good job. Thank you for this.
Unfortunately I am not a creative person even though I am a front-end developer but I can make-up with this lack watching your videos and your coding. So thank you very much sir.
Welcome bro :)
same here lol
same 😭😭
Sir mai appse contact karna chahta hu
@@donsonthewise sir college me full stack developer ke liye vaccancy Ari rhti hai
To sir apne kaise job li ye puchna hai
To sir ap apni mail id batayiye please
Very good, thank you. I was looking for this for a long time😃
Straight to the point very useful
Simple and understandable tutorial 👍
Thanks man, you helped me out a lot! God bless you
Online tutorials: Muchas gracias por su generosidad al compartir admirable conocimiento
THE BEST TUTORIAL EVER LOVE YOU MAN
AMAZING!!!! THANK YOU !!!!
i really love online tutorials thanks aaaallllooottt
Crazy simple!
was a big help
Thanks sir you save my life 👍
You are my inspiration sir
Thank You bro for making videos for us :)
a video of speeded up typing, amazing
follow you from Egypt . You are the prof of web.
So accurate and precise. Thanks
AWESOME!!! THANKYOU BRO!
Straight to the point!
You made it so simple thanks player
I have suggestion to showing us how to make it "responsive" (if it's possible). Your works are great man!
Oh, it's possible :) Look into CSS @media queries.
its really helpful to me as a beginner
wow this is so good thx man ❤
Very good videos, I hope to see many more greetings.
Awesome tutorial. Thanks...
I know you are getting less views but please keep going it really helps a lot.....😎😎
Your video very useful, thks a lot
sorry I have an error. thank you for your wonderful tutorials
Epic thank you
This is really helpful
So far so good: Now a question! How do I make the header, start as it’s own box/bar with color background, but NOT being on top of the image. But when scrolling down, it loose the background color, and goes on top of the underlying cover image and the rest of the page? ☺️
music: akashi ghandi White river
great! thank you!
thank u so much,,,, u saved the day
Thank u!!! you've save my life!
amazing, thank you so much!
incredibly great video
Amazing!!!
You're magic bro
looks amazing
Hello From Uzbekistan❤🇺🇿
thank you very much bro!!!!
Thank you so much, this was exactly what i was looking for, small simple JS projects, with great results! it helps me really a lot. Good job bruh :D
very helpful thanks a lot
Love it
Love it
I really like all your videos, and about all this one. Unfortunatelly, it was not responsive
Thank you so much!
Thank you so much ❤️
Awesome!!
Thanksgiving for this video
great!!
Amazing thanks...
Exciting!
It was so amazing
thanks a lot
Thanks alot 👍🏻👍🏻
I love it
عمل ممتاز
Good job.
Thanks very much
position: sticky; also works really well.
Yes bro...
@@OnlineTutorialsYT I think he didn't get that it's mostly about that cool effect
@@OnlineTutorialsYT sir can u pls provide me with the bg pic?
hey the thing is that , when you apply position: sticky , you need to tell it when to be sticky , so set the top:0 in the same div , i hope that's gonna help , as it did help me.
@@chiragsaini2314 for me isn't working, could you help me? my menu is not turning white
Really cool
masha allah so helpfull video
thanks for this
God bless you bro
Brilliant
Thank you!!!!!!!
thank you so much .
thanks!!
thanks you
Plz tell me what should I do my script is not working even I write it very carefully and as it is as shown in video but still nav bar doesn't show any transition when I scroll down
Thank you so much
thanks bro
Thank u
Thank you
Hello, I used this. it works fine. but I noticed when I take the variables used in this function as global variables and I go to borwser and scroll down to some where on the page, then I reload the page while I'm scrolled on that position. and then, after reloading when I scroll to the top the sticky class doesn't toggles.
But when I place the variables inside the function it self how you should in the tutorial it works fine.
Why this is happens? I'm really curious to know.
By the way. Thanks for giving us greate videos.
Nice tutorial
thank you!!!!
Ótimo vídeo parabéns 👌.
Um brasileiro :)
@@joaohoffman5613 oloooko 3 brs
@@dueloFifa sheeeeeesh ai s
thank you so much
Thanks 😊
thanks,work
Thanks ❤️
keep going bro and just don't be afraid to put your face and voice it will be good to se that