Created
January 27, 2010 14:33
-
-
Save cowboy/287877 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.event.special.load = { | |
add: function( handler, data, namespaces ) { | |
if ( /^img$/i.test( this.tagName ) && ( this.complete || this.readyState === 4 ) ) { | |
// If element is IMG and has been cached by IE, trigger the event explicitly. | |
var event = jQuery.Event( 'load' ); | |
event.data = data; | |
handler.call( this, event ); | |
} | |
} | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment