Jquery mobile page change jumps back to previous page

260 views
Skip to first unread message

Keshav Murthy

unread,
May 12, 2015, 10:35:08 AM5/12/15
to phon...@googlegroups.com
Hello, 

I've a big problem with a jQuery Mobile Application: I'm using changepage to switch the page with currentPage. There are no transitions included still it jump back to previous page. And declared $(document).bind("mobileinit", function(){ 
$.mobile.pushStateEnabled = false; 
$.mobile.defaultPageTransition = 'none'; 
}); 

Before the jquery mobile js loads. 

Any one can help me how can I solve this issue??

Appsotutely

unread,
May 16, 2015, 12:08:30 PM5/16/15
to phon...@googlegroups.com
You'll need to post a lot more code for anyone to be able to help.  Can you clarify when the issue pops up?  It sounds like you've got a loop where it jumps back to the previous page before you've actually even started your application.

Guillermo Pérez

unread,
May 21, 2015, 12:21:14 PM5/21/15
to phon...@googlegroups.com
Try using $( ":mobile-pagecontainer" ).pagecontainer( "change", url) instead of changePage. 
changePage has been deprecated on jQuery Mobile 1.4.0

AppDeveloper

unread,
May 25, 2015, 5:57:17 AM5/25/15
to phon...@googlegroups.com
Hi,

    My code sample is like below:

$.ajax({
url: 'test.php', 
data:somedatahere,  
dataType:'JSON', 
type:'POST', 
cache:false, 
success: function(data) {  
if(data.error == "success")
{
$.mobile.changePage('index.html',{reload : true, changeHash : true});
}

},
error: function(data) { 

}
});

When I just include only page - $.mobile.changePage('index.html') It works fines. The problem occurs only when I reload and changeHash or included any transition. 
Reply all
Reply to author
Forward
0 new messages