I have a transparent menu when you scroll, it changes color and so does the sub-menu. That part is fine.
The issue I’m having is when you scroll back up the menu changes back to transparent but the sub-menu stay the same color and the on scroll. What is should do is change back to transparent as well.
Here is the js code
jQuery(document).ready(function($){
$('.home .x-navbar-fixed-top, .home .x-navbar, .sub-menu').css("background-color", "transparent");
var image_height = $(".home #x-section-1").outerHeight();
$(window).scroll(function(){
if ($(this).scrollTop() > image_height) {
$('.home .x-navbar-fixed-top, .sub-menu').css({"background-color": "#232323 "});
} else {
$('.home .x-navbar-fixed-top, .submenu').css({"background-color": "transparent"});
}
});
});



