Commit fde7edc4 authored by John Resig's avatar John Resig

Added a fix for the hover mouseover/mouseout problem.

parent 32548da2
...@@ -31,7 +31,9 @@ jQuery.prototype.hover = function(f,g) { ...@@ -31,7 +31,9 @@ jQuery.prototype.hover = function(f,g) {
// A private function for haandling mouse 'hovering' // A private function for haandling mouse 'hovering'
function handleHover(e) { function handleHover(e) {
// Check if mouse(over|out) are still within the same parent element // Check if mouse(over|out) are still within the same parent element
var p = e.fromElement || e.toElement || e.relatedTarget; var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
// Traverse up the tree
while ( p && p != this ) p = p.parentNode; while ( p && p != this ) p = p.parentNode;
// If we actually just moused on to a sub-element, ignore it // If we actually just moused on to a sub-element, ignore it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment