拉动刷新Javascript
我正在使用JQuery Mobile,我已经看到了几个Pull to Refresh Scripts。
我特别喜欢这个,但即使是演示似乎也没有在他们的网站上工作。
我的问题是……有没有人知道刷新Web应用程序脚本的工作?
以下是一个示例性实现: http : //cubiq.org/dropbox/iscroll4/examples/pull-to-refresh/
使用了iScroll 。
我已经构建了自己的jQuery / jQuery Mobile插件(支持刷新和无限滚动): https : //github.com/zippy1978/jquery.scrollz
演示
用于刷新的代码库
$("body").ready(function _onbodyready() { var $feedback = $('#feedback'); $("#main-content-div") .pullToRefresh() .on("end.pulltorefresh", function (e, percent){ $feedback.html("ok"); }) .on("move.pulltorefresh", function (e, percent){ $feedback.html(percent + ' %'); })
});