Any opinion, how to add an active state (which remains highlighted after selected) to this code?
jQuery:
$(function() {
$("ul#navigation span").css("opacity","0");
$("ul#navigation span").hover(function () {
$(this).stop().animate({
opacity: 1
}, "slow");
},
function () {
$(this).stop().animate({
opacity: 0
}, "slow");
});
});
Add a css class to the item when you select the item.
the .addClass() jQuery method will do this.