1.0.2 • Published 9 years ago

left v1.0.2

Weekly downloads
17
License
ISC
Repository
github
Last release
9 years ago

Just bind once, run on mobile and pc;

Mix mobile events and pc events, extreme simple way to addEventListener;

You just need to bind "touchstart", it take effect as "mousestart" of "touchstart" according to IsMobile;

Usage:

var a = document.getElementsByTagName('body')

// or var a document.getElementsByTagName('body')[0]

a.on('touchstart', function() {
    //do something
});

Note:

for the moment it only support:

-------------------------------
|  PC         |   Mobile      |
-------------------------------
|  click      |   click       |
-------------------------------
|  mousestart |   touchstart  |
-------------------------------
|  mousemove  |   touchmove   |
-------------------------------
|  mouseend   |   touchend    |
-------------------------------
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

10 years ago