下拉刷新
<script>
apiready=function(){
api.setRefreshHeaderInfo({
visible: true,
loadingImg: 'widget://image/refresh.png',
bgColor: '#ccc',
textColor: '#fff',
textDown: '下拉刷新...',
textUp: '松开刷新...',
showTime: true
}, function(ret, err){
alert("ok");//这里ajax 后
//api.refreshHeaderLoadDone(); 移除这个效果
});
}
</script>
<script>
apiready=function(){
api.addEventListener({
name:'scrolltobottom',
extra:{
threshold:0 //设置距离底部多少距离时触发,默认值为0,数字类型
}
}, function(ret, err){
alert('已滚动到底部');
});
}
</script>