Skip to content

Commit

Permalink
Merge pull request #3 from apeatling/hammer-js-2
Browse files Browse the repository at this point in the history
Support Hammer.js version 2
  • Loading branch information
apeatling committed Apr 5, 2015
2 parents 4bb53d9 + 58a1794 commit 4fd7ce4
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 44 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Pull to Refresh for the Web
===========================
Pull to Refresh for the Web 1.1
===============================

![Web Pull to Refresh](http://apeatling.com/wp-content/uploads/2014/11/ptr-header1-1000x400.png)

Expand Down Expand Up @@ -34,7 +34,7 @@ This will work just fine with your own loading indicators or pull down arrow, ju
In order for this to function, you'll need to load both Hammer.js and the wptr.js script, and then initialize the WebPullToRefresh module. Add this just before the closing body tag:

```
<script src="lib/hammer.1.1.3.js"></script>
<script src="lib/hammer.2.0.4.js"></script>
<script src="lib/wptr.1.0.js"></script>
<script>
Expand Down Expand Up @@ -76,6 +76,9 @@ There are a few optional parameters you can pass on initialization:
// Number of pixels of dragging down until refresh will fire
distanceToRefresh: 70,
// The dragging resistance level, the higher the more you'll need to drag down.
resistance: 2.5
}
```

Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">

<title>Web Pull To Refresh</title>
<title>Web Pull To Refresh 1.1</title>

<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">

Expand All @@ -26,8 +26,8 @@
Pull down to refresh!
</div>

<script src="lib/hammer.1.1.3.js"></script>
<script src="lib/wptr.1.0.js"></script>
<script src="lib/hammer.2.0.4.js"></script>
<script src="lib/wptr.1.1.js"></script>

<script>
window.onload = function() {
Expand Down
7 changes: 0 additions & 7 deletions lib/hammer.1.1.3.js

This file was deleted.

Loading

0 comments on commit 4fd7ce4

Please sign in to comment.