Hi,
I am targeting an element within an svg that has an id (<path id="idName"> </path>) and when I console.log it or run the function I get back "null." What I am trying to do is hide that element via style="none". So I am calling a function on the onComplete var (onComplete: myFunc()), that function is simply using an getElementByID storing it in a variable and then assigning the style.display to none (e.style.display = "none").
I have searched the web for answers and some people have said that the DOM hasn't loaded entirely by the time the function is called. Some have said to use .addEventListener (document.addEventListener("DOMContentLoaded", myFunc)) or move the function to the end of the document. I have tried both and still logging "null." Seems like a pretty basic thing but any help would be appreciated. Thanks!