Waiting for Smidge to load JS before running inline js
Hi All,
I am having issues where the code I am porting to Umbraco 13 uses both external and inline javascript. Most of the time this is fine, except sometimes, it appears that the inline code is attempting to run before the external javascript has been loaded by smidge.
When the page loads, I get errors in the console indicating that $ is undefined, because the inline code runs before the external javascript is loaded.
Is there anyway I can delay the running of the inline javascript until after smidge has loaded the external files?
Waiting for Smidge to load JS before running inline js
Hi All,
I am having issues where the code I am porting to Umbraco 13 uses both external and inline javascript. Most of the time this is fine, except sometimes, it appears that the inline code is attempting to run before the external javascript has been loaded by smidge.
eg I have
When the page loads, I get errors in the console indicating that $ is undefined, because the inline code runs before the external javascript is loaded.
Is there anyway I can delay the running of the inline javascript until after smidge has loaded the external files?
Thanks
Kap.
I have managed to work around the issue using window.onload
which appears to work, but it seems a bit messy. Is there a better way to do this?
Thanks agian,
Kap.
is working on a reply...