element = window;
// if data is passed, bind to handler
- if( data != handler ) {
+ if( data != undefined ) {
// Create temporary function pointer to original handler
var fn = handler;
}
// Make sure that the function being executed has a unique ID
- if ( !handler.guid )
+ if ( !handler.guid ) {
handler.guid = this.guid++;
+ // Don't forget to set guid for the original handler function
+ if (fn) fn.guid = handler.guid;
+ }
// Init the element's event structure
if (!element.$events)
// Remove event lisenter to avoid memory leak
if ( jQuery.browser.mozilla || jQuery.browser.opera )
document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+ // Remove script element used by IE hack
+ jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
}
}
});
if ( script )
script.onreadystatechange = function() {
if ( this.readyState != "complete" ) return;
- this.parentNode.removeChild( this );
jQuery.ready();
};