Sumana Mohan![]()
The Pulldown to refresh module allows the user to refresh the page through an Ajax request. More popularly seen on Mobile devices, this module is supported on Mobile Safari and Desktop Webkit browsers.
Builds pulldown refresh from exisiting markup
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script> YUI({
modules: {
"gallery-pulldown-refresh": {
fullpath : "../../../build/gallery-pulldown-refresh/gallery-pulldown-refresh.js",
requires : ["substitute", "widget","node","io","scrollview","event","node-base", "node-event-delegate", "transition", "event-move"]
}
}
}).use("gallery-pulldown-refresh", function (Y) {
Y.PullDownExample = {
init : function(){
var pulldownRefresh = new Y.PulldownRefresh({
contentBox:'#reloadheader',
optoutSelector:'#content'
});
pulldownRefresh.render();
this.p = pulldownRefresh;
Y.subscribe("pulldown-refresh:refreshFeed", this.refreshFeed, this);
},
refreshFeed : function(){
Y.later('5000',this, function(){
Y.fire("pulldown-refresh:resetPulldown");
});
}
};
Y.PullDownExample.init();
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info