I created a script that changes the colors of certain elements when 'a' is hovered over
$( "p > a" ).mouseover(function() {
$('h3 a, .date, .post.text, p').css( "color", "#ddd" );
});
$( "a" ).mouseleave(function() {
$('h3 a, .date, .post.text, p').css( "color", "#585858" );
});
The functionality works well, but I would like to add a fade effect between these two color states. I attempted to use .animate but couldn't get it to work properly. Since I am still learning jQuery, I may be overlooking something important.
The purpose is to highlight the hovered element (a) by dimming the colors of the surrounding text. There might be a more efficient way to achieve this effect than simply changing colors in css.
Appreciate any help or suggestions, thank you!