title: fullPage.js afterSlideLoad causes plugin to be destroyed?
body: <p>i'm using <a href="https://github.com/alvarotrigo/fullPage.js/" rel="nofollow">fullPage.js</a> - I am not sure if it's being destroyed or just causing some jQuery error that basically destroys all the functionality.</p>
  
  <p>I'm trying to dynamically add navigation arrows for navigating between slides based on value of the var <code>numberSlides</code>. So, on load of any slide I want to check the slide (e.g <code>#portfolio-slide-1</code>) against the var <code>numberSlides</code>.</p>
  
  <p>If <code>numberSlides = 2</code> and I am on slide <code>1</code>, then the righthand arrow should be shown.</p>
  
  <p>If I'm on slide <code>2</code> and <code>numberSlides = 2</code> then I've already reached the end of the slides so no righthand arrow is needed.</p>
  
  <p>In order to do this, I'm trying to hook my function to the callback <code>afterSlideLoad()</code>, <strong><a href="https://github.com/alvarotrigo/fullPage.js/#afterslideload-anchorlink-index-slideanchor-slideindex" rel="nofollow">link to documentation here</a></strong></p>
  
  <p>This is my current code:</p>
  
  <pre><code>$.fn.fullpage.moveSlideRight();
  if(numberSlides &gt; 1){
     console.log("here1"); // this logs correctly
     checkCreateArrows(numberSlides);
  }
  
  function checkCreateArrows(numberSlides){
      console.log("here2"); // logs correctly
  
      $('#fullpage').fullpage({
          afterSlideLoad: function(slideIndex){
  
              // this is where is all goes wrong
  
              if(slideIndex == 1){
                  console.log("First slide loaded"); // never logs
                  if(slideIndex &lt; numberSlides){
                      console.log('There is stll another slide'); // never logs
                      // so create the arrow
                  }
              }
          }
      });
  }
  </code></pre>
  
  <p>So from above you can see that <code>checkCreateArrows()</code> is working because the <code>here2</code> logs.</p>
  
  <p>However as soon as it hits the <code>.fullpage</code> function the whole thing falls over. No errors, but the fullpage functions to define the heights of all the sections collapse, all the CSS added by fullpage no longer works. I have no idea what's happening. And the slide won't navigate correctly. </p>
  
  <p>So what am I doing wrong?</p>
  
  <p>I expect I've used <code>afterSlideLoad</code> incorrectly and it's causing jQuery after it to break? </p>
  
  <p>I have no idea how to debug this. Does my code look wrong?</p>