Tagged: Codeblock, javascript
Hi, I’m currently reworking my site (www.digilocker.co.uk) I’m rebuilding the site from scratch locally first, as it was a little too long in the tooth now to update live.
One of the features I was looking to add on my portfolio was to add demo’s of a few games & animations I’d been working on. These are built in PixiJS.
I’ve been running through a test, and managed to get it working by using the codeblock element, but only if I append it to the page. It just appears at the bottom of the page underneath the site & entire footer
If I use getelementbyid within the application code and try to target a color section or specific div, it just won’t find it no matter what I try.
e.g.
`document.body.getElementById(“wongadiv”).appendChild(app.view);
Is this possible at all? to have a javascript application run within a layout builder element as a div?
Any help or ideas greatly appreciated!
Ok so have managed to get this working into a color section on the layout with
document.getElementById(“wongadiv”).appendChild(app.view);
However I don’t really have that much control over it’s position only being a Colour Section. I would prefer to nest it within a column, is the colour section the only layout element that can have an ID set?
Thanks in advance!
Hi Digilocker,
Glad that you got it working for you.
This thread has more answers for you
https://kriesi.at/support/topic/adding-custom-id-to-enfold-elements/#post-832384
Best regards,
Victoria