Hello guys,
I have two divs (one of them hidden with CSS), which I'm fading in and out in alternance inside a common space, on hover.
This is the markup :
<div id="wrap">
<div class="image">
<img src="http://domain.com/images/image.png">
</div>
<div class="text hide">
<p>Text text text</p>
</div>
</div>
And I was applying this jQuery code to fade out the image - and fading in the text, on hover :
<script type="text/javascript">
$(function(){
$('#wrap').hover(
function(){
$('#wrap .image').fadeOut(100, function(){
$('#wrap .text').fadeIn(100);
});
},
function(){
$('#wrap .text').fadeOut(100, function(){
$('#wrap .image').fadeIn(100);
});
}
);
});
</script>
But the problem is that the text div gets sticky and won't fade out - always that the mouse movement is too quick.
Do you know where can it be the solution to this ?
I set up an online test : http://paragraphe.org/stickytext/test.html
Thanks for any tip