title: FadeTo() bei scrollTop
body: <pre><code>&lt;script&gt;      
      $(window).scroll(function(){
          var fromTopPx = 717; // distance to trigger
          var scrolledFromtop = $(window).scrollTop();
          if(scrolledFromtop &gt; fromTopPx){
              $("#farbe").fadeTo("slow", 0 );
          }else{
              $("#farbe").fadeTo("slow", 1 );
  
          }
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Hi, I have a fixed <code>div</code> that should not be displayed by default. If you go down 717px from the top, it should fade in. If you go back to the top, it should fade out.</p>
  
  <p>What am I doing wrong?</p>