I have used pulltorefresh.js plugin to use pull to refresh on my app. It works great but the only problem is it doesn't work on page load up or after the page is loaded. Works only after I navigate to some other tab and come back to home page & try. It works then.
I have searched the internet enough seems like only I have this problem seems like I'm doing something wrong. I did try removing "triggerElement: '#refresh'," it works then but on every page & refresh animation doesn't work.
PullToRefresh.init({
mainElement: '#refresh',
distThreshold: 50,
distMax: 60,
distReload: 40,
triggerElement: '#refresh',
instructionsPullToRefresh: 'Pull down to refresh the page',
instructionsReleaseToRefresh: 'Release to refresh the page',
instructionsRefreshing: 'Refreshing the page',
refreshTimeout: 2000,
onRefresh: function(){
window.location.reload(true);
}
});
I just want my app to reload using pull to refresh on the load if needed & after the pull to refresh is used.