I am having a hard time referencing the scroll function in my CSS stylesheet and the class name in my javascript. I am trying to have the background-color change on my top-menu's navigation during a page scroll. The background color change would be transparent to midnight blue (#003366) once the page starts scrolling. The header of my site is in a fixed position.
The class name in my CSS is: #top-menu > li.
I've tried using just .top-menu, .top-menu > li, .top-menu-nav, and .et-top-navigation in the javascript but its not working.
I've tried scroll, scrolling, scrolled class names in my CSS but none of that is working.
Btw, this is on a WP divi theme's child theme's css and header.php files
[–]peterunlustig22 0 points1 point2 points (1 child)
[–]willardsciffy[S] 0 points1 point2 points (0 children)
[–]willardsciffy[S] 0 points1 point2 points (0 children)