title: Override scroll up/down function if scrollTop is equal to 0
body: <p>I am having some trouble with this one.  I have a transparent header that fades out as the user scrolls down the page.  As the user scrolls up, the header has a black background to emphasize its existence.  Everything is working fine, but I need to override everything that happens in the function if and only if the scrollTop is equal to 0.  So when the user scrolls all the way back to the top, the header returns to transparent.  My current code is:</p>
  
  <pre><code>   $(window).scroll(
          {
              previousTop: 0
          }, 
          function () {
          var currentTop = $(window).scrollTop();
          if (currentTop &lt; this.previousTop ) {
              header.fadeIn('slow');
              header.css('background', 'rgba(0,0,0,.9)');
          } else {
              header.fadeOut();
          }
          this.previousTop = currentTop;
      });
  </code></pre>
  
  <p>Any help is much appreciated!</p>