Reputation: 13870
I have div and function mouseover:
$('#mydiv').mouseover(function(){
$('#otherdiv').show('slow');
});
$('#otherdiv').mouseout(function(){
$('#otherdiv').hide('slow');
});
but... The #otherdiv
on show cover #mydiv
and consists of 5 images 1px
separated from each other. I want to that #otherdiv
disappear after mouseout
but I get a blinking.
How to do it?
Upvotes: 3
Views: 163
Reputation: 206171
$('#mydiv').hover(function(){
$('#otherdiv').stop().show('slow');
}, function(){
$('#otherdiv').stop().hide('slow');
});
demo jsBin
http://api.jquery.com/hover
http://api.jquery.com/stop
Upvotes: 4
Reputation: 150263
Try it with stop
:
$('#mydiv').mouseover(function(){
$('#otherdiv').stop().show('slow');
});
$('#otherdiv').mouseout(function(){
$('#otherdiv').stop().hide('slow');
});
Upvotes: 2