title: fullpage.js video end image show for every section
body: <p>I am trying to hide the video at the end and show up the image but its reloading every time. I tried all the possible way and i am very new with js.</p>
  
  <p>here is my code </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          $('#fullpage').fullpage({
              navigation: true,
              navigationPosition: 'right',
              verticalCentered: true,
              onLeave: function(index, nextIndex, direction){
                //var img = document.getElementById("myImg");
                var vid = document.getElementById("myVideo");
                //var vidup = document.getElementById("yourVideo");
                //var hide = document.getElementsById('yourVideo')[0].style.visibility = 'visible';
                if(direction ==='down'){
                      $('video').each(function () {
                          //playing the video
                          $(this).get(0).play();
                      });
                  }
                  else if(direction ==='up'){
                      $('video').each(function () {
                          //playing the video
                          $(this).get(0).play();
                      });
                  }
  
              },//onLeave END
                  afterRender: function () {
                      $('video').each(function () {
                          //playing the video
                          $(this).get(0).play();
                      });
                  }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I need help to load image after the video and evertime i comeback to the slide the video should autoplay and show the image at the end.</p>