title: window.pageYOffset not working in Chrome
body: <p>So I am definitely a beginner at js, and this is probably simple but I don't know why this isn't working.
  I am trying to get a div to appear when the page Y Offset is greater than 30, but it isn't working. </p>
  
  <p>//js is below</p>
  
  <pre><code>var x = document.getElementById('play');
  var ypos = window.pageYOffset;
  
  var see = function() {
      if (ypos &gt; 30) {
  
      x.style.opacity = 1;
  
      } else {
  
          console.log('not working');
      }
  }
  
  window.addEventListener("scroll", see);
  </code></pre>