I have a simple link that changes when the user hovers, so something along these lines:
a.mylink {
background: url(..) top left no-repeat;
width: 100px; height: 100px;
}
a.mylink:hover,
a.mylink.jqHover {
background: url(..) top left no-repeat;
color: red;
}
Changed my mind about what I want to happen, basically I want to make it so that when a user hovers the link it will do the :hover stuff but slowly instead of instantly. So like a transition effect. I've made it into a class to make it easier to deal with the hover malarkey, so I'm guessing a simple add class and remove class but with some sort of fade timer?
I'm effectively trying to do this:
$('a.mylink').hover(
function () {
$(this).addClass('.jqHover');
},
function () {
$(this).removeClass('.jqHover');
}
);
But I want it to fade between the two classes!
/////////////////////// EDIT:
This is the code I have at the moment -->
$("ul.BrightLozenges li a").hover(
function() {
$(this).switchClass('Normal','Special',200,'easeOutBounce');
},
function() {
$(this).switchClass('Special','Normal',200,'easeOutBounce');
});
Which works fine, but I want to make it fade in and fade out, tried using 'fade' as the transition but it doesn't work?