title: javascript if statement checking if div is visible not working
body: <p>I cannot for the life of me figure out why this if statement is not working.</p>
  
  <p>The retrieveInfo function is passed an <code>event</code>, <code>code</code>, and the <code>target div</code> as seen here:</p>
  
  <p><code>onmouseover="return retreiveInfo(event, 'M003', 'target')"</code></p>
  
  <p>I must use the code as provided as much as possible for a school assignment.</p>
  
  <pre><code>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");
      }
  }
  </code></pre>