• Resolved mstephens268

    (@mstephens268)


    Hello,
    I have this plugin setup to display one page at a time in portrait mode. However, when viewing the flipbook on my iPhone7 in Chrome, it is displaying two pages instead. I have enabled the Responsive setting under Main Setings and One Page Swipe under Book Portrait Mode in View Settings. Container width and height are set to Auto.

    Can you please help me troubleshoot this? Otherwise, the text in the flipbook is unreadable on mobile devices.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Avirtum

    (@avirtum)

    Try this code inside the custom js section.

    
    //===========================================================
    // Book engines: TwoPageFlip, OnePageFlip, OnePageSwipe
    //===========================================================
    var instance = this,
    $ = jQuery;
    
    function resposive() {
        if(window.innerWidth > window.innerHeight) { // landscape
            instance.setBookEngine('TwoPageFlip');
        } else { // portrait
            instance.setBookEngine('OnePageSwipe');
        }
    };
    
    $(window).on('resize orientationchange', resposive);
    resposive();
    
    Thread Starter mstephens268

    (@mstephens268)

    Thanks. Can you confirm that the last word in the last line is “resposive” rather than “responsive”?

    Thread Starter mstephens268

    (@mstephens268)

    Also, after pasting and saving the code, WordPress gave me an error message reading, “Custom js code error: Unexpected token ;”.

    Plugin Author Avirtum

    (@avirtum)

    1) “resposive” is just a misprint )))
    2) Check the code, try to copy again from the message above

    Thread Starter mstephens268

    (@mstephens268)

    I corrected all three instances of “resposive” to “responsive.” The rest of the code is the same as you provided, but the book is still displaying two pages in portrait mode rather than one.

    Plugin Author Avirtum

    (@avirtum)

    Send me your config file to avirtum[@]gmail.com (use the hamburger menu top header right side). I will update it.

    Plugin Author Avirtum

    (@avirtum)

    P.S. Your code has incorrect characters after paste.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Portrait mode not working on mobile’ is closed to new replies.