Created
July 5, 2011 09:31
-
-
Save numbcoder/1064552 to your computer and use it in GitHub Desktop.
js image load
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
if(isie){ | |
if($.browser.version==6.0){ | |
image.onreadystatechange = function () { | |
if (image.readyState == "complete"){ | |
dothing(); | |
} | |
}; | |
}else{ | |
ie7imagetime = window.setInterval(function(){ | |
var rs = image.readyState; | |
if(rs=="complete"){ | |
window.clearInterval(ie7imagetime); | |
dothing(); | |
}else{ | |
return; | |
} | |
},200); | |
} | |
}else{ | |
image.onload = function () { | |
if (image.complete == true){ | |
dothing(); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment