1. Home
  2. Docs
  3. Advanced Customizations
  4. Reset flipbook zoom on flip

Reset flipbook zoom on flip

Demo:

CSS BookGLFW manualBrand Manual TemplateLifeStyle MagazineMazda 6

Code:

We can use the beforeFlip() function to reset the flipbook zoom, when flipbook starts to flip.

<script>
//Supports version 2.0 and above
jQuery(function(){

    DFLIP.defaults.beforePageChanged = function(flipbook){
        flipbook.resetZoom();
    }

});
</script>

<script>
//Supports version below 2.0
jQuery(function(){

    DFLIP.defaults.beforeFlip = function(flipbook){
    if(flipbook.zoomValue !==1)
        flipbook.zoomValue =1.001;
        flipbook.zoom(-1);
    }
    }

});
</script>
For WordPress, please read on 
How to add Custom Code to WordPress Pages

Leave a Comment