Created
March 30, 2015 18:10
-
-
Save waaronking/624254a3d08aa76bd18b to your computer and use it in GitHub Desktop.
Check for loaded script before executing
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
var loaded = false; | |
while (loaded === false) { | |
for (i in $('script')) { | |
if ($('script')[i].src && $('script')[i].src.indexOf('name_of_script_here') > -1) { | |
loaded = true; | |
optInLiHPExperience('a'); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment