Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@EeroHeroHeino
Last active October 16, 2016 22:03
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 EeroHeroHeino/d32ea306a9be2a77537f to your computer and use it in GitHub Desktop.
Save EeroHeroHeino/d32ea306a9be2a77537f to your computer and use it in GitHub Desktop.
var fn = function waitLoop() {
// picture is loaded if it has width
var width = document.querySelector("img[src='./theme/images/logos/hostedatisc.png']").naturalWidth;
if (typeof width != "undefined" && width > 0) {
callback(true);
} else {
setTimeout(waitLoop, 1000);
}
}
fn();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment