1. Home
  2. Docs
  3. DearFlip jQuery Flipbook Plugin
  4. Customizations
  5. Update URL hash on the address bar when a page flips

Update URL hash on the address bar when a page flips

When flipbook opens or the page changes, the hash URL also needs to be updated.

Note: This customization feature can be included in the core in future – if a proper solution emerges without confusing the user.

Final Result:

Open Flipbook


What is expected:

Changes the hash URL on Address bar when a flipbook page changes.


How to customize:

We use the callback option onFlip() to update the URL Hash.
Add the following script to your site using the script editor plugin. This affects all flipbooks on the pages where this code is added.

<script>

jQuery(function() {

    DFLIP.defaults.onFlip = function(flipbook){
        if(flipbook.options.isLightBox == true){
            flipbook.getURLHash();
        }
    }

});

</script>

Note: Further fine-tuning and code changes might be added as per need.

How can we help?

Leave a Comment