Skip to content

Instantly share code, notes, and snippets.

@mikebannister
Created May 31, 2012 17:39
Show Gist options
  • Save mikebannister/2844968 to your computer and use it in GitHub Desktop.
Save mikebannister/2844968 to your computer and use it in GitHub Desktop.
setTimeout(function() {
console.log(FOTOMOTO.API.isBasketEmpty()); // -> true
}, 1000);
setTimeout(function() {
console.log(FOTOMOTO.API.isBasketEmpty()); // -> true
}, 2000);
setTimeout(function() {
console.log(FOTOMOTO.API.isBasketEmpty()); // -> false
}, 3000);
setTimeout(function() {
console.log(FOTOMOTO.API.isBasketEmpty()); // -> false
}, 4000);
// So it's a bit of a hack, but you can use the follow jQuery to do it:
$(window).load(function(){
fotomoto_ready(function(){
setTimeout(function(){
console.log("fotomoto_ready", FOTOMOTO.API.isBasketEmpty()); // -> true
}, 100);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment