What is the best way to reference html inside of hype using an internal hype function? I have a script that works fine as regular text html but am trying to convert to hype.
simple example of what I want to do:
<div id = "shapes"> <img src="" id="myPicture1" alt="some image"> </div>
document.getElementById("myPicture1").src = myPix;
(myPix is an array of images)
This is a simple example of the kind of thing I am trying to do. I am just having trouble figuring out how to make this kind of thing work in hype. Would the html go in a widget? If so, can I reference its id from a hype function?
Or is this the wrong approach? Should I be using the id assignment inside of hype? I’d prefer to be able to access the html directly if possible.
This is just a workflow question. Once I understand the setup, I can adapt the whole script.