Get started with pulltorefreshjs CDN
MIT licensed
Pulltorefresh.js: Lightweight library for implementing pull to refresh gesture in web apps.
Tags:- pulltorefresh
- webapp
Stable version
Copied!
How to start using pulltorefreshjs CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with pulltorefreshjs CDN - cdnhub.io</title>
<style>
#content {
height: 200px;
overflow: auto;
}
</style>
</head>
<body>
<div id="content">
<p>Pull to refresh...</p>
</div>
<script src="https://cdn.cdnhub.io/pulltorefreshjs/0.1.22/index.umd.min.js"></script>
<script>
const pullToRefresh = new window.PullToRefresh({
container: document.getElementById('content'),
onRefresh: () => {
// Your code to fetch new data and update the content here
console.log('Refreshed!');
pullToRefresh.endRefreshing();
}
});
</script>
</body>
</html>
Copied!
Copied!