hi guys,
I am trying to use jquery's hover to clear one timeout (cleartimeout) on a set variable (timer) and then set another (settimeout) once the mouse leaves the element. Any ideas on how to do this?
My code so far (that doesn't work!!!!) is:
$(function() {
$('ul.contact').hover(function() {
$(this).clearTimeout(timer).animate({ 'opacity' : 0.7});
}, function() {
$(this).setTimeout( function()
{
$('ul.contact').fadeOut('slow');
}, 8000);
});
timer = setTimeout(function() {
$('li#contact').removeClass('cur');
$('li#$url').addClass('cur');
}, 8625);
});