0

With Webflow native custom code editor, I added to my website an external script made by Finsweet inside the <head> tag, as they instruct to do.

I want to make some changes in the page with my own script after the execution of Finsweet's one but I'm limited by my knowledge in asynchrous JavaScript and use of JavaScript in HTML code.

Here is what it looks like:

<!-- [Attributes by Finsweet] CMS Slider -->
<script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsslider@1/cmsslider.js"></script>
<script>
  // my own script
</script>

Putting my own script before the closing </body> tag is still not enough to allow the external script to fully execute.

I want a clean solution that avoids using a timer, knowing that I'm also limited by Webflow's environment.

1

1 Answer 1

0

First of all, F'insweet code tags should be placed in your header tag (according to their Docs).

If you want to ensure that your custom script starts executing only after F'insweet's script, you can add the defer attribute to the F'insweet end of script tag as so :

<script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsslider@1/cmsslider.js" defer ></script>

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.