Skip to content
DearFlip – Convert PDF to Interactive 3D Flipbooks
  • Plugins
    • WordPress Flipbook
    • Joomla Flipbook
    • Javascript Flipbook
  • Demos
    • Embedded Example
    • Popup Examples
    • Online PDF Viewer
  • Pricing
  • Docs
  • Support
  • Account
  • Blog
DearFlip – Convert PDF to Interactive 3D Flipbooks
  • Plugins
    • WordPress Flipbook
    • Joomla Flipbook
    • Javascript Flipbook
  • Demos
    • Embedded Example
    • Popup Examples
    • Online PDF Viewer
  • Pricing
  • Docs
  • Support
  • Account
  • Blog

Getting Started

  • Getting started
  • File Structure & Template
  • Basic Usages
  • Options List

FAQs

  • Support and FAQs
  • License Activation
  • Why are there PHP files in download zip file?

Examples

  • Examples
  • Basic – Flipbook using HTML
  • Basic – Using options
  • Adding Outline/Table of Content
  • Adding Search

Customizations

  • Translate UI texts
  • Customize Loading
  • onPageChanged
  • Customizations
  • Open flipbook in full-screen
  • onReady Function
  • PDF links custom class and usages
  • Update URL hash on the address bar when a page flips
  • How to add custom share button?

Advanced Customizations

  • Add Close button to ToolBar
  • Advanced Customizations
  • Store last viewed flipbook page
  • Add Custom Button to Flipbook
  • Add Custom Download button to Flipbook
  • Add print button to flipbook
  • Add Custom Zoom Reset button to Flipbook
  • Thumb animation on page scroll
  • Load more button for lightboxes
  • Reset flipbook zoom on flip
View Categories
  • Home
  • Documentation
  • Advanced Customizations
  • Thumb animation on page scroll

Thumb animation on page scroll

–

–

–

–

–

–

Please scroll Below to see the animation:

–

–

–

–

–

–

CSS BookGLFW manualBrand Manual TemplateLifeStyle MagazineMazda 6

–

–

–

–

–

–

Please scroll up to see the animation:

–

–

–

–

–

–


JavaScript Code: #

<script>

/** First we get all the non-loaded image elements **/
var lazyImages = [].slice.call(document.querySelectorAll("._df_thumb"));

/** Then we set up a intersection observer watching over those images and whenever any of those becomes visible on the view then replace the placeholder image with actual one, remove the non-loaded class and then unobserve for that element **/
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
    entries.forEach(function(entry) {
        if (entry.isIntersecting) {
             var lazyImage = entry.target;
            lazyImage.classList.add("_df_thumb-transition");
            //lazyImageObserver.unobserve(lazyImage);
        }else{
            var lazyImage = entry.target;
            lazyImage.classList.remove("_df_thumb-transition");
        }
    });
});

/** Now observe all the non-loaded images using the observer we have setup above **/
lazyImages.forEach(function(lazyImage) {
    lazyImageObserver.observe(lazyImage);
});

</script>

Stylesheet CSS: #

<style>

._df_thumb{
    border-radius: 8px;
    opacity: 0;
    transform: scale(1.2);
}

@media (prefers-reduced-motion: no-preference) {
  ._df_thumb{
    transition: opacity 1.5s ease, transform 1.5s ease;
  }
}

._df_thumb-transition {
    opacity: 1;
    transform: none;
}

</style>

Updated on October 13, 2023

More Inquiry/Info & COMMENTS:

All DearFlip comments and discussion have been moved to
https://github.com/dearhive/dearflip-js-flipbook/discussions

Table of Contents
  • JavaScript Code:
  • Stylesheet CSS:

Links

  • Terms and Conditions
  • License Terms
  • Privacy Policy

Recent Posts

  • Calendar Mode(Beta) June 22, 2025
  • Best Flipbook Javascript Plugins with Pros and Cons December 16, 2024
  • PDF Partial Loading – What, How and Why? September 28, 2023
  • PDF Hyper Links are not working? What is the issue? December 17, 2021
  • How Does Flipbook Size Work and How Can I Make It Larger? May 23, 2021

Categories

  • Blog (5)
  • Flipbook PDF Related Articles (7)
  • Tutorials (5)

Examples

  • JavaScript Flipbook Popup Examples
  • DearFlip – Convert PDF to Interactive 3D Flipbooks

Explore

  • Terms and Conditions
  • License Terms
  • Privacy Policy
Thanks for the visit. Create amazing 3D Flipbooks in your Worpdress site with dFlip Flipbook Wordpress Plugin. Also Available as dFlip jQuery Flipbook Plugin. For PowerPoint related info visit Dear Slides and get free powerpoint templates.

Recent Posts

  • Calendar Mode(Beta)
  • Best Flipbook Javascript Plugins with Pros and Cons
  • PDF Partial Loading – What, How and Why?
  • PDF Hyper Links are not working? What is the issue?
  • How Does Flipbook Size Work and How Can I Make It Larger?

Products

  • DearFlip WordPress Flipbook
  • DearFlip 3D Flipbook JS Plugin
  • Online PDF Viewer
  • DearFlip PDF Flipbook for Chrome
© 2025 | A product of DearHive.com