Home

Awesome

jQuery PointerEvents v0.5.2 Build Status Coverage Status

Basic polyfill for Pointer Events W3C Specitication using jQuery special events API.

what?

PointerEvents

Polyfill is trying to dynamically wrap all the possible mouse*, touch* and MSPointer* events to provide a single PointerEvent Interface. Read more.

why?

Because there are too many different events types on different platforms with different input mechanisms. Read more.

how?

$ bower install --save jquery-pointerevents
<!-- load jQuery and plugin as browser globals or with RequireJS/AMD -->

<script>
    $('body').on({
        pointerdown: function(e) { console.log(e); },
        pointerup: function(e) { console.log(e); },
        // …
    });
</script>

implemented

not implemented

cross-browser compatibility

Depends on your jQuery version – jquery.com/browser-support.

Also, caniuse.com/#feat=pointer:

// nothing to do in IE11 for today
if(win.navigator.pointerEnabled) {
    return;
}

test

alternatives

license

MIT