Beta 5: JS that Works in the Content, doesn't work in the Header

Hi!

I have tried to add a Weather widget HTML/JS into the Header. It shows up blank.
The same widget shows up as expected inside the Content editor.

<a class="weatherwidget-io" href="https://forecast7.com/hr/44d8815d62/plitvicka-jezera/" data-font="Roboto" data-mode="Current" data-days="3" data-textcolor="#65AB8C" >Plitvička Jezera, Croatia</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js');
</script>

Gave that a shot and it looks like it just doesn’t have a width. I was able to get it working by placing it in a Raw Content element (inside a Container) and adding width via CSS

.weatherwidget-io {
  width: 100%;
}

Interesting. Still blank for me on few installs. OK, it is important that there is no bug there. I’ll test more and see what makes it disappear in my case.

Thanks!

Sounds good! Could also be something with the flexbox settings on the Container.

1 Like