SOLVED: callback problem
SOLVED: callback problem
Hi everyone,
I am experiencing a problem with this function:
-
1 //show corresponding <p> when hovering over a elements
2 jQuery("#QuickInfoList li a").hover(function(){
3 window.clearTimeout(myTimeout);
4 bFooterActive = true;
5 jQuery("#QuickInfoActiveText p").hide();
6 jQuery("#QuickInfoList a").attr("class","");
7 jQuery(this).attr("class","active");
8 var sRefString = jQuery(this).attr("href");
9 jQuery("#QuickInfoActiveText p" + sRefString).show();
10 }, function(){
11 bFooterActive = false;
12 myTimeout = window.setTimeout(function(){restoreActiveP(oActiveAElementOnPageCall)},iSnapBackTiming);
13 });
This function works just fine. It is used to display certain elements in a certain area when hovering over elements outside that area (similair to the footer at
www.simonebingemer.de).
Now I would like to change the hide() and show() functions to fadeOut() and fadeIn() functions. However, when I change the hide() function in line 5 to s.th. like .fadeOut(200, function(){alert("test");}), the alert will be fired immediately upon entering the hover element.
Of course my intention is to fire the fadeIn() when the fadeOut() has finished.
Anybody got an idea why the callback function does not work here?[/url]