I have a project that uses jQuery. And I am trying to convert this script to Javascript. I had the following line on that script.
var a = $("#myImage");
I changed it to
var a = document.getElementById("myImage");
but script is not working because my page hasn't loaded yet when this happens. I have no idea how to fix this. Any help would be greatly appreciated. Thank you.