Hi, I have a jquery plugin that I want to use. I have a jquery plugin that I want to use. :
<script type="text/javascript">
$(window).on('scroll', function(){
if($(window).scrollTop()){
$('nav').addClass('color');
$('logo').attr('src', '/img/logo-dark.png');
}else{
$('nav').removeClass('color');
}
})
</script>
I have the html with the logo fixed on this navbar below:
<nav>
<div id="logo" class="logo">
<a href="#"><img src="img/logo-branco.png"></a>
</div>
In case, every time you scroll down the same color in the navbar, change the logo to the logo that is in the location src="img / logo-dark.png"