I'm looking to change the navigation from transparent to a color on scroll. Much like this site. http://createone.com/contact-us/ I've seen posts about changing size which is great, I'll use this as well but would like to mainly go from transparent to a color. Any help would be great. I do have a little experience with jquery but haven't been able to figure it out or modify someone else's previous questions to my needs.
I saw this but wasn't able to get it to work for me. jquery change opacity and height on scroll
A jsfiddle demo would be great!
Thanks in advance for the help. Also I'm using Bootstrap 4 so if there's any plugins out there. I'm open to that as well.
In this site, the navigation height is not actually changing. It's fixed positioning. The navigation is positioned relative to the browser window.
jsfiddle
HTML:
CSS:
Hi you can check this to begin : http://jsfiddle.net/rcAev/177/
Here i made this function:
I'll explain you step by step:
Third compare to the breakpoint you want , in this case i choose 300 because i want to change the nav after pass the height form the image.
Fourth to change the transparent to color the action i apply is add a
class
with new background and different height: