3D FlipBook - How can i call ajax when first page flip

m***8@gmail.com
2020-10-17
2020-10-19

I have implemented 3dflipbook i want to call ajax only one time when first page flip by user

Replies

a***r@3dflipbook.net
2020-10-19
2020-10-19

Use ready function https://3dflipbook.net/documentation#general-approach :

var options = {
pdf: 'example.pdf',
..,
   ready: function(scene) {
          var handler = function(e) {
            console.log('Ajax here');
            scene.ctrl.removeEventListener('endFlip', handler);
          };
          scene.ctrl.addEventListener('endFlip', handler);
        }
};
m***8@gmail.com
2020-10-20
2020-10-20

thanks it's work...

Log In to leave a comment