Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery Animate, Opacity and Tooltip Re: Jquery Animate, Opacity and Tooltip

#62024
Steven Gardner
Participant

Ok i have added an .addClass function when mouseover but how do i get back to the original state when i move my cursor away from the effected area.

Code:
$(“li a”).addClass(“nav-start”);
$(“li a”).mouseover(function(){
$(“li a”).addClass(“nav-hover”);
});

EDIT SO FAR

Code:
$(“li a”).addClass(“nav-start”);
$(“li a”).mouseover(function(){
$(“li a”).removeClass(“nav-start”);
$(“li a”).addClass(“nav-hover”);

$(“li a”).mouseout(function(){
$(“li a”).removeClass(“nav-hover”);
$(“li a”).addClass(“nav-start”);
});
});

I have most of the effect sorted out i just need a more smoother transition now and a tooltip to appear.

All ideas and suggestions to my my code so far better- welcome.

Thanks