Changes between Initial Version and Version 2 of Ticket #1970
- Timestamp:
- Nov 27, 2007, 11:36:36 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1970
- Property Owner set to davidserduke
-
Property
Status
changed from
new
toassigned
-
Ticket #1970 – Description
initial v2 24 24 Example fix: 25 25 {{{ 26 #!JavaScript27 26 jQuery.fn.extend({ 28 27 hover: function(f,g) { 29 30 28 // A private function for handling mouse 'hovering' 31 29 function handleHover(e) { 32 30 // Check if mouse(over|out) are still within the same parent element 33 31 var p = e.relatedTarget; 34 35 32 // Traverse up the tree 36 33 while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; }; 37 38 34 // If we actually just moused on to a sub-element, ignore it 39 35 if ( p == this ) return true; // this was previously FALSE 40 41 36 // Execute the right function 42 37 return (e.type == "mouseover" ? f : g).apply(this, [e]); 43 38 } 44 45 39 // Bind the function to the two event listeners 46 40 return this.mouseover(handleHover).mouseout(handleHover);