I have a jQuery function that fades in and out a sprite (sprite without text) from one background to another, and it's working as intended. However, this function is also fading out the text within an element. HTML:
<div id="menu">
<ul class="main_menu current-s1">
<li class="s1"><a class="hov" id="main" href="/portfolio" title="main">MAIN<span></span></a></li>
<li class="s2"><a class="hov" id="me" href="/portfolio" title="me">ME<span></span></a></li>
</ul>
</div>
Jquery:
$(function() {
$(".hov").find("span").hide().end().hover(function() {
$(this).find("span").stop(true, true).fadeIn();
}, function() {
$(this).find("span").stop(true, true).fadeOut();
});
});
Is it possible to keep that text? I know I could use a sprite with added text, but I also have an animation written for that text so I'd like to keep it.
Here is my Fiddle: http://jsfiddle.net/vrt15/jzn7gb97/
Regards