Skip to content

Instantly share code, notes, and snippets.

@numbcoder
Created July 5, 2011 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numbcoder/1064552 to your computer and use it in GitHub Desktop.
Save numbcoder/1064552 to your computer and use it in GitHub Desktop.
js image load
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