chuyeow (owner)

Revisions

gist: 73697 Download_button fork
public
Public Clone URL: git://gist.github.com/73697.git
Embed All Files: show embed
jQuery mouseleave.js #
1
2
3
4
5
6
7
8
9
10
11
// Show popup when user hovers over a child element of a container div.
$('div.child', '#container').mouseover(function() {
  $('#popup').show();
});
 
// But hide it only when the mouse pointer leaves the container. Mouseout doesn't
// work here because of event bubbling - it'll trigger on child elements of
// #container as well.
$('#container').bind('mouseleave', function() {
  $('#popup').hide();
});