edgeless
01-30-2015, 05:33 PM
I've been using a modified jQuery slider with an iframe feed to display our FB fan page activity. I'm using it on a vB 4.2.x installation. The code is currently in my footer template. I began to notice that about 5% of the time on showthread pages, the plugin won't finish loading and will thus cause the page itself not to reach load completion. Granted, 5% of the time isn't much... but it's still not right.
I tried adding the following string to the FB-supplied JS code block, but it made no difference:
js.async=true;
I then added the following delayed loading directive, and it worked everywhere but on showthread pages:
var myTimer = window.setTimeout(function() {
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=XXXXXXXXXXXXXXXX&version=v2.0";
}, 3000);
I can vary the 3 second time to any delay I wish and it works perfectly - everywhere except on any showthread pages! It seems that showthread just ignores this delay code. As a result, sometimes thread pages will not reach a loading completion state.
Can anyone either shed some light on why this happens, or perhaps provide a solution for me?
Thanks in advance.
I tried adding the following string to the FB-supplied JS code block, but it made no difference:
js.async=true;
I then added the following delayed loading directive, and it worked everywhere but on showthread pages:
var myTimer = window.setTimeout(function() {
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=XXXXXXXXXXXXXXXX&version=v2.0";
}, 3000);
I can vary the 3 second time to any delay I wish and it works perfectly - everywhere except on any showthread pages! It seems that showthread just ignores this delay code. As a result, sometimes thread pages will not reach a loading completion state.
Can anyone either shed some light on why this happens, or perhaps provide a solution for me?
Thanks in advance.