Created
October 27, 2015 14:30
-
-
Save margusmartsepp/2d2fcb102b59331c8d5c to your computer and use it in GitHub Desktop.
loogika
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 (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