Mouse2Touch 0.1

Mobile Safari does a good job for making websites work seamlessly in a mouse-free environment. In general, it is pretty painless for both users and developers. For example, if you tap on something, the event would automatically be interpreted and handled as a mouse click. However, not everything is automatic; if the websites have any interactions involving mousedown, mousemove, and mouseup, they will not work well on Mobile Safari.

To support those interactions everywhere, developers need to take care of both touch and mouse events. One approach is to have additional event listeners for touch, but it gets tedious and ugly very quickly. Mouse2Touch takes a more elegant approach - it's a nice little plugin that automatically map your mouse events to touch events.



Details

Author
Chi Wai Lau
Current version
0.1
GitHub
clau/Mouse2Touch
Downloads
1640
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.2.4: '*'

How to use

Given that you already have included MooTools -core in your app, just include Mouse2Touch.js in your page head.

    <head>
      <title>...</title>
      <script type="text/javascript" src="path/to/mootools-1.2.4-core.js"></script>
      <script type="text/javascript" src="path/to/Mouse2Touch.js"></script>
    </head>

Support

Please contact me (clau@tabqwerty.com) if you have any suggestions or comments.


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus