Open mal3k opened 10 years ago
Hi, The best is to disable content loading initially.
If you look at the code of the mobile.html example:
Comment the initial data loading and hide the pull header:
// Load initial items
//loadMore();
setTimeout(function() {
$('#content').scrollz('hidePullHeader', false);
}, 20);
Modify the bottomreached event handling to prevent loading more items if the current list is still empty:
// Bind events
$(document).on('bottomreached', '#content', function() {
// Load more
if ($('#items li').length > 0) {
loadMore();
}
});
I hope it will help you.
Regards, Gilles
In mobile.html, I noticed the pull is launched automatically after the document has finished loading. I would love to know how to disable that on the document load and only keep it on user pull event. Thanks