fullpage.js moveTo () - Funktion

Ich versuche, die moveTo() Funktion in fullpage.js, die mir ermöglicht die Navigation zu einem bestimmten Abschnitt/Folie, die wie folgt aussieht:

/*Scrolling to the section with the anchor link `firstSlide` and to the 2nd Slide */
$.fn.fullpage.moveTo('firstSlide', 2);

Ich versuche, dies innerhalb der afterSlideLoad() Funktion, in einem Versuch, um automatisch Zyklus durch die Folien. mein code sieht wie folgt aus:

 $.fn.fullpage({
     anchors: ['home', 'gallery'],
     afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex) {
         if (anchorLink == 'gallery') {
             if (slideIndex == 11) {
                  setTimeout(function() {
                      moveTo(2,0);
                  }, 1000);
             } else {
                  setTimeout(function() {
                      moveTo(2, slideIndex + 1);
                  }, 1000);
             }
         }
     });

Welches nicht angezeigt wird, etwas zu tun, ich hab auch schon versucht moveTo('gallery', 1);

Anregungen mit, wohin ich gehe falsch gemacht?

InformationsquelleAutor gardni | 2014-04-02

Schreibe einen Kommentar