NEW!!! NOW WORKING EVEN ON IE 7/8

Touchable

Touchable is a very lightweight (1,96kb) jQuery Class that unifies touch and mouse events over different platforms like desktops and mobile devices with touchscreens (like Android, iPad, iPod Touch, iPhone etc.) The name Touchable therefore might be a bit confusing, cause we actually generate a generic "Touch" which involves also mouse events. For convenience they are all called "Touches".

Touchable really doesn't depend that much on jQuery, so it should work with other libraries like Zepto too. Havent tested that though.

Hoverable

Hoverable is built upon Touchable and is a very lightweight (1,57kB / 3,04 together with Touchable) jQuery Class that unifies hover events over different platforms like desktops and mobile devices with touchscreens (like Android, iPad, iPod Touch, iPhone etc.) It introduces a new event called

Testing

right now I have tested Touchable on the following devices and browsers Chrome, Firefox, Safari, iPad Simulator, iPad, iPhone, Internet Explorer 7/8. But it should work quite everywhere. If you have any bug notes drop me a line.

Demo

I have setup a demo site for Hoverable on the github page. View source to see how everything works.

Usage

Right now Touchable supports five basic events and Hoverable adds two generic Hover events, all events when bound with jQuery's bind function get a touch object passed in as second argument

TOUCHABLE

HOVERABLE

you use it by initializing Touchable on a view element, like so:

var div = $(<div>).Touchable();

or

var div = $(<div>).Hoverable(); //which cretaes a Touchable internally

then you bind to the events

div.bind('touchmove', function(e, touch){})
div.bind('newHover2', function in(e, touch){}, function out(e, touch){})

notice, that each event gets passed a touch object, besides the normal event object. The Touch object has the following properties:

Event targets:

Todos