DEV Community

Discussion on: Hide NavBar as Scroll down, in less than 10 lines of javascript;

pavelloz profile image
Paweł Kowalski • Edited on

I think if you removed all your javascript, so its 0 lines of javascript, and removed position:fixed; from css it would hide as well while scrolling. ;)

areeburrub profile image
Areeb ur Rub Author

Nice Suggestion, but then it won't appear again when scroll up and you have to reach the Navigation bar back to top.

The Navigation bar is something which should be easily accessible, don't you think after scrolling on a long feed user want NavBar to move to the another page instantly.

Hope you get my point 😄

hasnaindev profile image
Muhammad Hasnain

Sure but if a user has scrolled down and want to access navigation bar, what happens then? Think a little about UX. ;)

pavelloz profile image
Paweł Kowalski

Im thinking about UX, thats why i propose not using js in this case. ;)