@joecbrown,
Adding the below code to a JS Extension scoped to Pre-Loader seems to do the trick for me. Let me know if this works for you.
function waitForElement(selector, time, function_to_run, max_runs, this_run) {
if (typeof max_runs === 'undefined')
max_runs = 10;
if (typeof this_run === 'undefined')
this_run = 1;
if (max_runs < this_run)
return;
if (jQuery(selector).length) {
function_to_run();
return;
} else {
this_run++;
setTimeout(function() {
waitForElement(selector, time, function_to_run, max_runs, this_run);
}, time);
}
}
waitForElement('#_tealiumModalWindow', 25, function() {
jQuery('#_tealiumModalWindow').attr("style", "background-color:blue;opacity: 0.5;")
})
... View more