I am trying to access the "Style" part of an object in my index.html file using a function and was wondering if anyone knew how to do this? I am having some success but I think its a matter of scope.
In one function I have loaded and set the style of an image and assigned it to a var logo.
Then added and appended to the className
logo.className += " logo-branding-image";
In another function I have some code that should change its visibility:
document.getElementsByName('logo').style.visibility = 'visible';
From construct I am calling this function to change the visibility, but logo (or whatever I use in its place) is undefined.
Would anyone know how to correct this issue so I can make that happen?