Can't run jsfiddle in Webflow -> querySelector return null


This is my first time with webflow and I have the kicker.
I’m working on embed this jsfiddle to my webflow site:

  1. FiDDLE
  2. MY SITE

If you see in inspect panel - Console log return a bug - “Cannot read property ‘querySelectorAll’ of null”, so if I understand well, this is a problem with selecting inside this.DOM. But why? Any idea?

If you want some more information - let me know.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

js should always go on before not on head section, if you run javascript in the head the dom is still unparsed, so your svg doesn’t exist when the code is runned

1 Like

What a stupid mistake. 2 days for looking… Thanks!