Running javascript after all elements are loaded

I am trying to load a script after everything else on the page as it references elements by id but they need to be loaded before the javascript runs.

What method I can use to ensure this is run ON THE PAGE (not in the backend) after the other elements have been loaded.

Normally this would be added in a footer but bubble only has header HTML for the page itself.
I also tried running it using the toolbox plugin after pageload, still not working.

The only way it does work is if I put it in the body under settings but then it only works in chrome and doesnt work in safari or iphone.

Any help appreciated!

1 Like

You can try the plugin below.


One thing to try is using the defer attribute in your <script> tag…

“When present, it specifies that the script is executed when the page has finished parsing.”

If it works, it’s a super simple and clean approach.

This topic was automatically closed after 70 days. New replies are no longer allowed.