title: I have a jQuery code where opacity goes up as cursor goes down. How do I reverse it?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $(function() {
          var $win = $(window),
              h = 0,
              opacity = 0,
              getWidth = function() {
                  h = $win.height();
              };
      
          $win.mousemove(function(e) {
              getWidth();
              opacity = (e.pageY / h);
              console.log(opacity);
              $('#myElement').css('opacity', opacity);
          });
      });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>     #myElement {
           height: 100px;
           width: 100px;
           background-color: blue;
       }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="myElement"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="http://jsfiddle.net/WV8jX/791/" rel="nofollow noreferrer">http://jsfiddle.net/WV8jX/791/</a></p>
  
  <p>When the mouse goes down, the element shows. I want to do the same thing except I want the element to disappear as you scroll down, instead of showing up. Any ideas how to do that?</p>