mFo
October 16, 2021, 11:23am
1
I’m looking for the steps needed to integrate custom code (HTML, CSS, JS), for example this Read More-button code from codepen
What I’ve tried:
copying the CSS code into the page header (contained inside <style> </style>
)
copying the JS code into the page footer (contained inside (<script> </script>
)
copying the HTML code into the a code widget
I get the button showing, the custom colors appearing, but the button doesn’t work.
Jerry
October 16, 2021, 3:53pm
2
No need for Codepen. What you’re looking for can be simply achieved with “toggle visibility” which is baked into Blocs.
1 Like
mFo
October 16, 2021, 4:17pm
3
That’s great @Jerry !
I’m also wondering how to generally import external CSS/JS/HTML code to Blocs from other codepen projects?
Jerry
October 16, 2021, 4:23pm
4
In general (but not written in stone) :
Al HTML goes into a Code Bric. All CSS into the page footer and all. JS into the page header.
1 Like
If your project is set to Bootstrap 5 that code won’t work because it’s jquery not pure JavaScript. Bootstrap 5 no longer needs the dependency, which is a good thing as it’s less overhead on your site. Just something you need to be aware of.
1 Like
Jerry
October 17, 2021, 1:30am
7
The answer is under need it!
mFo
October 17, 2021, 6:06am
8
Great, thanks for explaining that!