从页面 2 跳转到页面 3 第3个页面会ajax加载数据 ,但是这时,第2个页面也会跟着滑动,第2个页面会比第3个页面稍微快一点滑动到位置,然后被第3个页面覆盖住,下面是代码,请问是为什么?
$(document).ready(function(){
mui.init({
pullRefresh: {
container: '#pullrefresh',
down: {
callback: pulldownRefresh
},
}
});
mui.plusReady(function(){
//关闭等待框
var classId = localStorage.classInsId;
var stuId = localStorage.stuId;
getPeperList(stuId,classId);
plus.nativeUI.closeWaiting();
mui.currentWebview.show();
});
var page = mui.preload({
url:"rollingAnswer.html",
id:"rollingAnswer",
});
})
$("#listBox").on("tap","li", function(e) {
var thisId=this.id;
var idArr=thisId.split("-");
localStorage.paperId=idArr[1];
mui.openWindow({
url:"rollingAnswer.html",
id:"rollingAnswer",
show:{
autoShow:true,
aniShow:"slide-in-right",
duration:300
},
style:{
zindex:2
},
waiting:{
autoShow:false,//自动显示等待框,默认为true
}
})
});
/**
* 下拉刷新具体业务实现
*/
function pulldownRefresh() {
mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
}
function getPeperList(stuId,classId){
if(stuId!=null
0 个回复