下拉有刷新
var refreshbox = new pulltorefresh({
container: "#app",
pull: {
callback: function() {
settimeout(function() {
n = 0 addhtml("html") refreshbox.endpullrefresh(true)
}, 1000)
}
},
up: {
callback: function() {
settimeout(function() {
if (n < 5) {
n++addhtml("append") refreshbox.enduploading(true)
} else {
//没有数据
refreshbox.enduploading(false)
}
}, 1000)
}
}
})