mui.init();
(function($) {
//阻尼系数
var deceleration = mui.os.ios?0.003:0.0009;
var sel = document.querySelectorAll('.mui-slider-group .mui-scroll');
$('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
deceleration:deceleration
});
$.ready(function() {
//循环初始化所有下拉刷新,上拉加载。
$.each(sel, function(index, pullRefreshEl) {
var num = this.getAttribute('index');
$(pullRefreshEl).pullToRefresh({
down: {
callback:function(){
var self = this;
mui.getJSON('http://cdjiubo.com/index.php/Home/Article/index/appjson/1/p/1/sid/1/rows/1',function(data,textStatus){
var table = document.getElementById('table');
var text = data.rows[0].content;
var alg = document.createElement("a");
alg.innerHTML = text;
table.insertBefore(alg,table.firstChild);
});
self.endPullDownToRefresh();
}
}
});
});
});
})(mui);

河马哥
- 发布:2016-12-06 11:40
- 更新:2016-12-06 12:02
- 阅读:1702
河马哥 (作者)
大神 感谢了 我改成下滑加载了
2016-12-06 13:17