mui中上拉刷新事件<div>中a标签中的链接在电脑上可以点击,但是在手机端不能够触发
代码如下```javascript
<div class="mui-content mui-scroll-wrapper" id="search">
<div class="mui-scroll" style="padding-top:55px;">
<ul class="mui-table-view" id="bikeStationList">
<li>
</li>
</ul>
</div>
</div>
//下拉进行刷新方法
mui.init({
pullRefresh: {
container: '#search',
up: {
contentrefresh: '正在加载...',
callback: pullupRefresh
}
}
});
//下拉操作执行获取数据
var flage= true;//判断条件
var pageIndex =1;//请求页数
function pullupRefresh() {
setTimeout(function() {
var keyWord = $("#searchVale").val();
var obj="";
if(flage) {
doGet(g_wssturl + "RXWSSTWeb/publicBicycle.web?getNearGgzxcList", {lontitude:113.300854,latitude:22.810388,keyWord:keyWord,pageIndex:pageIndex},function(data){
if(data != '') {
obj = jQuery.parseJSON(data.obj);
if(obj !="" && obj.length>0){
for(var i=0;i <obj.length;i++){
var bikeHtml = "";
bikeHtml+='<li class="mui-table-view-cell mui-media"><a href="javascript:showPark('+'\''+obj[i].PARK_NAME+'\','+'\''+obj[i].PARK_ADDR+'\','+'\''+obj[i].NUM1+'\','+'\''+obj[i].NUM2+'\','+'\''+obj[i].NUM3+'\','+'\''+obj[i].PARK_X+'\','+'\''+obj[i].PARK_Y+'\''+');"><table><tr><th class="text-lve">'+obj[i].PARK_NAME+'</th></tr>';
if(obj[i].PARK_ADDR != null && obj[i].PARK_ADDR !=""){
bikeHtml+='<tr><td class="text-lve" >地址:'+obj[i].PARK_ADDR+'</td><td style="text-align: center;"><a href="" class="pic_qiu" style=""><img src="images/wechat/pic_qiu.png" width="30"></a></td></tr>';
}else{
bikeHtml+='<tr><td class="text-lve" style="color: red;">地址:</td><td style="text-align: center;"><a href="" class="pic_qiu" style=""><img src="images/wechat/pic_qiu.png" width="30"></a></td></tr>';
}
if(obj[i].D == "" || obj[i].D == null){
bikeHtml+='<tr><td><u>可借:'+obj[i].NUM1+'</u><u>可停:'+obj[i].NUM2+'</u><u>异常:'+obj[i].NUM3+'</u></td><td style="text-align: center;">0 km</td></tr></table></a></li>';
}else{
bikeHtml+='<tr><td><u>可借:'+obj[i].NUM1+'</u><u>可停:'+obj[i].NUM2+'</u><u>异常:'+obj[i].NUM3+'</u></td><td style="text-align: center;">'+obj[i].D+'km</td></tr></table></a></li>';
}
$("ul li:last-child").after(bikeHtml);
}
mui('#search').pullRefresh().endPullupToRefresh(!flage); //控制是否还有数据执行刷新操作
}
}
//判断当数据为空时不再执行刷新操作
if(obj.length == 0){
flage = false;
}else{
flage = true;
pageIndex++;
}
}, null, "jsonp");
}
}, 1000);
}
if (mui.os.plus) {
mui.plusReady(function() {
setTimeout(function() {
mui('#search').pullRefresh().pullupLoading();
}, 1000);
});
} else {
mui.ready(function() {
mui('#search').pullRefresh().pullupLoading();
});
}