Skip to content

Instantly share code, notes, and snippets.

@sirpengi sirpengi/touch.js

Created Jul 18, 2014
Embed
What would you like to do?
emulate touch event
// go to http://patrickhlauke.github.io/touch/tests/event-listener.html
el = document.getElementsByClassName("button")[0];
e = new Event("touch");
e.initEvent("touchstart", true, true);
el.dispatchEvent(e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.