JQuery Mobile& URL参数在重新加载时闪烁白色 [英] JQuery Mobile & URL Parameters white flash on reload

查看:248
本文介绍了JQuery Mobile& URL参数在重新加载时闪烁白色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用查询移动设备进行 phonegap 应用程序,我通过网址将参数传递到下一页。



  main.html?id = 1,menu.html?id = 2 etc 
ajaxEnabled
设置为false,允许它通过信息我需要。在这样做,我无法使用从页面到页面的转换,这意味着我得到一个白色的闪光,因为页面重新加载。



我会动态产生这些连结。

  $。ajax {
url:'URLTO WEBSERVER',
dataType:'jsonp',
jsonp:'jsoncallback',
timeout:5000,
success:function状态){
$ .each(data,function(i,item){
var list ='< li>< a href =menu.html?idcat ='+ item.id_cat +' >'+ item.category_cat +'< / li>'
output.append(list);
});
},
error:function(jqXHR,textStatus ){
alert(请求失败:+ textStatus);
output.text('加载数据时出现错误')
}
}

是否有解决方案?

解决方案

我认为他关心的是白色plash页面,发生在请求完成后,从服务器,然后他调用changePage。
他不担心如何发送参数到服务器等。这是假设所有这是工作正常。


I am using query mobile for a phonegap application, I am passing through parameters through the url to the next page.

For example:

main.html?id=1, menu.html?id=2 etc

To allow this I have to turn ajaxEnabled to false to allow it to pass through the information I need. In doing so I am unable to use transitions from page to page which means I get a white flash as the page reloads.

I am generating these links dynamically.

$.ajax({
url: 'URLTO WEBSERVER',
dataType: 'jsonp',
jsonp: 'jsoncallback',
timeout: 5000,
success: function(data, status){
$.each(data, function(i,item){ 
var list = '<li><a href="menu.html?idcat='+item.id_cat+'">'+item.category_cat+'</li>'
output.append(list);
});
},
error: function(jqXHR, textStatus) {
alert( "Request failed: " + textStatus );
output.text('There was an error loading the data.')
}
});

Is there a solution?

解决方案

I think he is concerned about the "white plash page" that happens after the request is completed from server and then he calls changePage. He is not worried about how to send parameters to server etc. This is assuming all that is working fine.

这篇关于JQuery Mobile&amp; URL参数在重新加载时闪烁白色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆