3
I have this link that shows/hides the menu of the site, I want to draw the attention of the users for it changing the color of the font, it is possible to do only with CSS?
setInterval(function(){
if ($('#toggleMenu').hasClass('colored')) {
$('#toggleMenu').css('color','#FAFAFA');
$('#toggleMenu').removeClass('colored');
} else {
$('#toggleMenu').css('color','#0069D9');
$('#toggleMenu').addClass('colored');
}
}, 2000);
header {
background-color: grey;
padding: 0 5%;
}
#toggleMenu {
text-decoration: none;
color: #FAFAFA;
transition: color 2s;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"/>
<header>
<a id="toggleMenu" href="#" style="font-size: 2em"><i class="fas fa-bars"></i></a>
</header>
Brother, well could you post about technology on twitter or on a heim blog? I think you have a lot of content to post...
– Laércio Lopes
@Laérciolopes thanks friend thanks for the words, this is what motivates us to continue collaborating. I even feel like doing a Youtube channel, not because I have too much content, but so I can spend some of what I see in English that I know there are people who do not have such easy access to this content in Portuguese... It was worth the force [s]
– hugocsl
Thank you, we’re together!
– Laércio Lopes
My friend! Do you know how to resolve this situation? https://answall.com/questions/422999/addir-toast-bootstrap-stacked-por-jquery
– Laércio Lopes
@Laérciolopes JS guy is not really my specialty, I think I won’t be able to help you... But there in your question, try to assemble a minimum example that to execute your problem, type the minimum code enough to make Toaster appear etc
– hugocsl
Sorry to bother you, man, I did some more tests here!
– Laércio Lopes
Thanks anyway!
– Laércio Lopes