$.ready(function() {
//循环初始化所有下拉刷新,上拉加载。
$.each(sel, function(index, pullRefreshEl) {
var num = this.getAttribute('index');
$(pullRefreshEl).pullToRefresh({
down: {
callback:function(){
mui.ajax('en',{
data:{},
dataType:'json',
type:'get',
success:function(data){
var table = document.getElementById('table')
var text = data.rows[0].content;
var alg = document.createElement("a");
alg.innerHTML = text;
table.insertBefore(alg,table.firstChild);
alert(sel[num].innerHTML);
}
})
}
}
});
});
});
1 个回复
河马哥 (作者)
大神们求指导啊