Web Simulator touch event problem

How to generate touch event? Piano example not works properly under Web Simulator.

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.


4 Replies
saab aman
which touch mean by mouse aur hand.because they both are handled differently.and use emulator instead of simulator to check
Artem Novikov
Thanks for advice, but It's impossible to run emulator on my netbook. And seems touch by hand impossible reproduce on Web Simulator..
You can use this code to map the right events( mouse events on computer and touch events on device ) depending on whether you run your app on a pc or a device.
var supportTouch = $.support.touch, scrollEvent = "touchmove scroll", touchStartEvent = supportTouch ? "touchstart" : "mousedown", touchStopEvent = supportTouch ? "touchend" : "mouseup", touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
Then just bind your events using the variables instead of the event name :
instead of
Note that you need jQuery for this to work.
Artem Novikov
Ok, it's that easy. Thanks