Why do the pages blink/flicker after transitions in my jQuery Mobile PhoneGap app on iOS?

前端 未结 4 1334
走了就别回头了
走了就别回头了 2020-12-11 05:16

I have a jQuery Mobile app that I\'ve converted to an iOS app using PhoneGap. I\'m using version 1.1.0 of jQM.

I\'m using \"fade\" transitions between pages (as I re

4条回答
  •  孤街浪徒
    2020-12-11 06:00

    This guy solved the problem - it worked for me:

    http://outof.me/fixing-flickers-jumps-of-jquery-mobile-transitions-in-phonegap-apps/

    CSS:

    body {
        /* Setting body margins to 0 to have proper positioning of #container div */
        margin: 0;
    }
    
    /* #container div with absolute position and 100% width and height so it takes up whole window */
    #container {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    

    JS:

    $(document).one("mobileinit", function () {
    
        // Setting #container div as a jqm pageContainer
        $.mobile.pageContainer = $('#container');
    
        // Setting default page transition to slide
        $.mobile.defaultPageTransition = 'slide';
    
    });
    

    And wrap all your jQM pages in a single

提交回复
热议问题