Flip page amazon like

109 views
Skip to first unread message

Eugen Besel

unread,
Nov 15, 2017, 1:31:42 PM11/15/17
to epubjs
Hello together,


I found out the following code snippet 
EPUBJS.Hooks.register('beforeChapterDisplay').pageAnimation = function (callback, renderer) {
    window.setTimeout(function () {
        var style = renderer.doc.createElement("style");
        style.innerHTML = "*{-webkit-transition: transform {t} ease;-moz-transition: tranform {t} ease;-o-transition: transform {t} ease;-ms-transition: transform {t} ease;transition: transform {t} ease;}";
        style.innerHTML = style.innerHTML.split("{t}").join("0.5s");
        renderer.doc.body.appendChild(style);
    }, 100)
    if (callback) {
        callback();
    }
};
how can I use it?
how should I call this function from my code? is this the correct function at all??
thank you for your help.
wbr
Reply all
Reply to author
Forward
0 new messages