Skip to content

Instantly share code, notes, and snippets.

@margusmartsepp
Created October 27, 2015 14:30
Show Gist options
  • Select an option

  • Save margusmartsepp/2d2fcb102b59331c8d5c to your computer and use it in GitHub Desktop.

Select an option

Save margusmartsepp/2d2fcb102b59331c8d5c to your computer and use it in GitHub Desktop.
loogika
if (specialid == null) {
ado.slave(id, {
myMaster: master
});
} else {
if (specialid != id) {
$(el).attr('id', specialid);
ado.slave(specialid, {
myMaster: master
});
setTimeout(function() {
var isloaded = eval(specialid + ".isEmpty==0");
console.log("special ad [" + specialid + "] is empty: " + !isloaded);
//fallback
if (!isloaded) {
$(el).attr('id', id);
ado.slave(id, {
myMaster: master
});
}
}, 2000);
} else {
ado.slave(id, {
myMaster: master
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment