I cannot for the life of me figure out why this if statement is not working.
The retrieveInfo function is passed an event, code, and the target div as seen here:
onmouseover="return retreiveInfo(event, 'M003', 'target')"
I must use the code as provided as much as possible for a school assignment.
function retreiveInfo(e, movieCode, div) {
if(e.pageX) {
this.x = e.pageX;
} else {
this.x = e.clientX;
}
if(e.pageY) {
this.y = e.pageY;
} else {
this.y = e.clientY;
}
div = document.getElementById(div);
if(div.style.visibility == "visible") {
console.log("More Good");
}
else if(div.style.visibility == "hidden"){
console.log("Hidden");
}
}