mercredi 5 août 2015

Make one single page scrollable using fullPage.js


I'm trying to make one single section (page) with large content scrolling using fullPage.js. There is a method described here http://ift.tt/1Un9joY, to set option scrollOverflow: true. But this option applies to all sections, this is not what needed. I searched throw methods http://ift.tt/QUtWx5 and found one $.fn.fullpage.setFitToSection(false);, but It's not for my case.

Is there any way to switch scrollOverflow option, depending on nextIndex (onLeave : function(index, nextIndex, direction))?

I found in source code

  /**
    * Sets fitToSection
    */
    FP.setFitToSection = function(value, type){
        setVariableState('fitToSection', value, type);
    };

So I think adding next code might help

  /**
    * Sets setScrollOverflow
    */
    FP.setScrollOverflow = function(value, type){
        setVariableState('scrollOverflow', value, type);
    };

Or more universal version

   /**
    * Sets any option variable
    */
    FP.setOptionVariable = function(variable, value, type){
        setVariableState(variable, value, type);
    };

But all this requires fullpage source code change. Any other ideas?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire