title: fullpage.js how to detect vertical scrolling
body: <p>I am building a page with a few "stages" which the <strong><a href="http://alvarotrigo.com/fullPage/" rel="nofollow">fullpage.js</a></strong> plugin provides.</p>
  
  <p>My main problem is that I need to apply a fixed position header, which by default I do by using a simple script that I use for most of the cases so far. And here it is:</p>
  
  <pre><code>$(document).scroll(function () {
    var a = $(this).scrollTop()
    if (a &gt; 5) {
  $('header').addClass('headerSnap')
    } else {
      $('header').removeClass('headerSnap')
    }
  });
  </code></pre>
  
  <p>I simply calculate the viewport offset ammount and tell it to append a class to the header using a fixed position. But here the problem is that fullpage.js does not allow my simple script to detect an offset, so therefore the class is not being applied. </p>
  
  <p>What can I do to bypass this issue?</p>