2012-05-20 24 views
3

我的div和功能鼠標懸停:鼠標懸停及移出和分度,圖像1px的分離

$('#mydiv').mouseover(function(){ 
    $('#otherdiv').show('slow'); 
}); 

$('#otherdiv').mouseout(function(){ 
    $('#otherdiv').hide('slow'); 
}); 

...但是... #otherdiv展出蓋板#mydiv,由5個圖像1px彼此分開的。我希望#otherdivmouseout後消失,但我閃爍。

怎麼辦?

回答

2

stop試試:

$('#mydiv').mouseover(function(){ 
    $('#otherdiv').stop().show('slow'); 
}); 

$('#otherdiv').mouseout(function(){ 
    $('#otherdiv').stop().hide('slow'); 
}); 
相關問題