Hi,
I’m using the following to make my header transition from transparent to solid when scrolling.
I was wondering if you have any suggestions on how to modify it so that my Logo appears once the header is solid.
Any suggestions would be greatly appreciated!
jQuery(document).ready(function($){
$('.x-navbar-fixed-top').css("background-color", "transparent");
$(window).scroll(function(){
if ($(this).scrollTop() > 400) {
$('.x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.99)").css("transition","0.3s ease-in-out ");
} else if ($(this).scrollTop() > 300) {
$('.x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.75)").css("transition","0.3s ease-in-out ");
} else if ($(this).scrollTop() > 200) {
$('.x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.5)").css("transition","0.3s ease-in-out ");
} else if ($(this).scrollTop() > 100) {
$('.x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.35)").css("transition","0.3s ease-in-out ");
} else {
$('.x-navbar-fixed-top').css("background-color", "transparent").css("transition","0.3s ease-in-out ");
}
});
});