I am using JQuery Mobile and I've seen a couple of Pull to Refresh Scripts around.
I especially like this one but even the demo doesn't seem to work on their website.
My question is ... does anyone know of any working pull to refresh scripts for web apps?
I am using JQuery Mobile and I've seen a couple of Pull to Refresh Scripts around.
I especially like this one but even the demo doesn't seem to work on their website.
My question is ... does anyone know of any working pull to refresh scripts for web apps?
Share Improve this question asked Nov 13, 2011 at 9:35 Satch3000Satch3000 49.4k89 gold badges224 silver badges349 bronze badges4 Answers
Reset to default 4I have built my own jQuery / jQuery Mobile plugin (pull to refresh and infinite scrolling are supported): https://github.com/zippy1978/jquery.scrollz
Demo
Code Base for pull to refresh
$("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 + ' %');
})
});
Highly recommend the Pull to Refresh library here. Just implemented it and it works great.
For a basic functionality, go to their GitHub and download the index.umd.min.js file and include it. Then, use the following code:
PullToRefresh.init({
mainElement: '#main_div',
onRefresh: function() { location.reload(); }
});
This will mimic the functionality you can see here in this demo