https://i.sstatic.net/kSuVW.jpg.
Need to update the stick color to white when scrolling in responsive version, but currently it remains black. How can I change the color to white? Here is the HTML:
<div class="menu_area">
<nav class="navbar navbar-expand-lg navbar-light">
<!-- Logo -->
<a class="navbar-brand" href="#">
<img src="img/svg/black.svg" class="lia-logo" style="margin-top: -15px;width: 48px; height: 38px;">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#ca-navbar" aria-controls="ca-navbar" aria-expanded="false" aria-label="Toggle navigation"><span class="zina"></span></button>
<!-- Menu Area -->
<div class="collapse navbar-collapse" id="ca-navbar">
<ul class="navbar-nav ml-auto" id="nav" style="margin-right: -220px;">
<li class="nav-item active"><a class="nav-link" href="#home" style="color: #000;">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#about" style="color: #000;">About</a></li>
<li class="nav-item"><a class="nav-link" href="#features" style="color: #000;">Why Lia</a></li>
<li class="nav-item"><a class="nav-link" href="#application" style="color: #000;">Application</a></li>
<li class="nav-item"><a class="nav-link" href="#support" style="color: #000;">Support</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="#team">Team</a></li>-->
<li class="nav-item"><a class="nav-link" href="#contact" style="color: #000;">Contact</a></li>
</ul>
<!--
<!--
<div class="sing-up-button d-lg-none">
<a href="#">Sign Up Free</a>
</div>-->
</div>
</nav>
</div>
The CSS for this section is as follows:
.menu_area .navbar-brand {
font-size: 72px;
font-weight: 700;
color: #fff;
margin: 0;
line-height: 1;
padding: 0;
}
.menu_area .navbar-brand:hover,
.menu_area .navbar-brand:focus {
color: #fff;
}
@media (min-width: 768px) and (max-width: 991px) {
#ca-navbar {
padding: 30px;
color: red;
border-radius: 3px;
background: linear-gradient(to right, #007ADF, #00ECBC);
text-align: left;
}
}
@media (min-width: 320px) and (max-width: 767px) {
#ca-navbar {
padding: 20px;
border-radius: 3px;
/* background-color: #CFD1D2;*/
background: linear-gradient(to right, #007ADF, #00ECBC);
text-align: left;
}
}
The code that seems to be causing an issue is the following JavaScript snippet:
background-image: url(data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://ww…p='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E);
You have also included this JavaScript code:
$window.on('scroll', function () {
if ($window.scrollTop() > 48) {
$('.navbar-toggler').attr('src',"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
} else {
$('.navbar-toggler').attr('src',"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
});
If you're facing issues with this code, double-check for any errors. Have you tried troubleshooting the JavaScript code for potential bugs or mistakes?