Mouseleave mouseenter and selection

http://jsfiddle.net/msNhr/

When you go through "aaaaa", an overlay is displayed when you try to select one of the selections within the close overlay. How do I get it right?

The overlay should only be closed if the actual overlay area is left.

Thanks!

+2
source share
1 answer

see this script: http://jsfiddle.net/msNhr/3/ (tested on Fx14 and Ch 21.0.1180.57)

I just stopped distributing the mouseleave event mouseleave that it doesn't get overlay

Matching js

 $(function() { $('#a').mouseenter(function() { $('#overlay').show(); }); $('#overlay').mouseleave(function() { $(this).hide(); }); $('#overlay select').mouseleave(function(ev) { ev.stopPropagation() }); }); 
+6
source

All Articles