I am attempting to make a simple animation that would change a color of a font, but I am struggling with said reference error. Can anyone point me to the right direction, please? I have already installed color animation jQuery-plugin.
HTML:
<ul class="menu">
<li><a href="">ABOUT US</a></li>
<li><a href="">CONTACT</a></li>
</ul>
JS:
$('.menu').find('a').on('mouseenter', function() {
$(this).css({color: rgba(239, 231, 35, 0.8)});
});
Your JavaScript code is missing some quotes.
Change this line:
$(this).css({color: rgba(239, 231, 35, 0.8)});
To this:
$(this).css({'color':'rgba(239, 231, 35, 0.8)'});
Since you're using jQuery color animation, then the below code would do the trick:
$(this).animate({color: 'rgba(239, 231, 35, 0.8)'});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With