Hey guys,
thanks to that script i found in that forum, it's now possible to change the color of the navbar from transparent to any color by scrolling.
<script>
jQuery(document).ready(function(){
jQuery(window).scroll(function() { // check if scroll event happened
if (jQuery(document).scrollTop() > 25) { // check if user scrolled more than 50 from top of the browser window
jQuery(".navbar").css({"background-color": "rgba(66,70,80,1.0)", "backdrop-filter": "saturate(180%) blur(20px)"}); // if yes, then change the color of class "navbar" to white (#ffffff)
} else {
jQuery(".navbar").css({"background-color": "transparent", "backdrop-filter": "none"}); // if not, change it back to transparent
}
});
});
</script>
I'm not really into coding, so can anyone of you tell me what i have to add to this script that the jquery only executes for desktop view? atm it also effects the mobile version, resulting into display errors.
Thanks for your help!