I'm struggling to make my i
elements lose the outline
class on hover. However, instead of smoothly transitioning out, the class is simply lost and added back immediately. Strangely enough, when I use the same code with a background
class, it works perfectly fine. What could be causing this issue?
Another problem that I've encountered is that when attempting the transition with a background
class, the background sticks around for the duration of the fade (set to 500ms) and then suddenly disappears. Ideally, it should smoothly fade out like a proper transition.
Any help would be greatly appreciated!
$('nav a').hover(function(){
if (!$(this).find("i").hasClass("home")){
$(this).find('i').toggleClass('outline', 500);
}
})