Here is a demo of what I am trying.
I am basically trying to create a tooltip effect. BUt When I browse the tooltip area, the box flashes on. It is due to the mouseleave
and mouseenter
being triggered.
Basic, structure is something like this
<section id="tooltipContainer">
<ul>
<li>
<a>Text that is show up</a>
<div class="extension"> <!-- Tool Tip Division -->
text
</div>
</li>
</ul>
</section>
To create the tootip effect, I do this
$("li").on('mouseenter', function() {
$(this).children(".extension").stop().fadeIn();
}).on('mouseleave', function() {
$(this).children(".extension").stop().delay(500).fadeOut();
});
How to avoid triggering the mouseleave
and mouseenter
?
Update:
By switching the padding values, I was able to get rid of the flashing, but since the container also have overflow:hidden;
so blocking the whole tooltip now. Any ideas?
Here is the fiddle of the this update: here