1. Home
  2. Docs
  3. Advanced Customizations
  4. Add Custom Button to Flipbook

Add Custom Button to Flipbook

User can add custom buttons to flipbooks.


JavaScript Code:

<script>

  jQuery(function($){

    var customButtonFunction = function(event){
      alert("Custom Button Works");
    };

    //We add the function in Global Defaults so that all flipbooks in the page act same.
    DFLIP.defaults.onReady = function(flipbook) {

      var customButton = jQuery('<div class="df-ui-btn  df-ui-custom-button1">Custom-Btn</div>');
      customButton.on("click",customButtonFunction);
      flipbook.ui.more.after(customButton);

    };

  });

</script>

Stylesheet CSS:

<style>

.df-ui-custom-button1{
  width:max-content;
}

</style>

For WordPress, please read on 
How to add Custom Code to WordPress Pages

Articles

How can we help?

Leave a Comment