- setup: function() {
- // Make sure the ready event is setup
- bindReady();
- return;
- },
-
- teardown: function() { return; }
- },
-
- mouseenter: {
- setup: function() {
- if ( jQuery.browser.msie ) return false;
- jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
- return true;
- },
+ // Make sure the ready event is setup
+ setup: bindReady,
+ teardown: function() {}
+ }
+ }
+};
+
+function stopImmediatePropagation(){
+ this._sip = 1;
+ this.stopPropagation();
+}
+
+if ( !jQuery.browser.msie ){
+ // Checks if an event happened on an element within another element
+ // Used in jQuery.event.special.mouseenter and mouseleave handlers
+ var withinElement = function(event) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+ // Traverse up the tree
+ while ( parent && parent != this )
+ try { parent = parent.parentNode; }
+ catch(e) { parent = this; }