Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Mobile flicker/white screen in iPhone

After detail search and googling I finally decide to put my question.

In my JQM web app there are total 4 pages. 2 of them are dynamically populated via Ajax. I have used

$.extend($.mobile, {
        defaultPageTransition: 'none'
    });

My dynamically populated function is

$.get_detail= function(){
  $.ajax({
    url: "mypage.cfm",
    data: data,
    timeout:5000,
    cache:false,
    type:'GET',
    dataType:"html",
    success: function(data3) {
       //$('#filldiv').empty();
       $("#filldiv").html(data3);
    $.mobile.changePage('#detailpage');
    },
    error: function(statusCode, errorThrown)
    {
    if (statusCode.status == 0) 
        alert("you are offline");
        else
        alert("Please try again.");
    }
        });
    }

When I change page flash white screen just like flicer happened but when there is no data fill in div then there is no flicker. I have noticed that, if there is no screen size change then every thing is okay and if screen size change by filling the dynamic content flicker happen

Please help me out to solve this issue. Thank you

like image 462
miftkhar Avatar asked Nov 03 '22 03:11

miftkhar


1 Answers

Here's what I'm using to disable default transitions:

$(document).on( "mobileinit", function() {
   $.mobile.defaultPageTransition = 'none'; 
});

The newest version 1.4, is also supposed to help with better transitions.

like image 194
Joe's Ideas Avatar answered Nov 08 '22 15:11

Joe's Ideas