Skip to content

Commit

Permalink
README: Add example for using PEP with jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Sep 25, 2015
1 parent efb6b49 commit 2ea5c13
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ By default, no Pointer Events are sent from an element. This maximizes possibili

1. As elements come and go, or have their `touch-action` attribute changed, they will send the proper set of Pointer Events.

#### Using PEP with jQuery

You can use pointer events with jQuery and PEP:
```html
<div id="canvas" touch-action="none"></div>
<script src="pep.dist.js"></script>
<script src="jquery.js"></script>
<script>
$("#canvas").on("pointermove", function(event) {
draw(event);
});
</script>
```
Check out [this jsbin demo](http://jsbin.com/bojumofowa/1/edit?html,css,js,output) for a full demo.

## Polyfill Details

### Getting Started
Expand Down

0 comments on commit 2ea5c13

Please sign in to comment.