Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does html5 support touch on mobile phones?

I was wondering if html5 is supporting touch functionality on a mobile device native? So we don't have to make an native app for iOS/Android/WP7 but can make an html5 page which loads in the mobile browser.

EDIT

I mean the JavaScript support for touch native in the browser so you can do you own thing with the touch in html5.

like image 534
Wessel Kranenborg Avatar asked May 23 '11 15:05

Wessel Kranenborg


People also ask

Does HTML5 work on mobile?

HTML5 pros and cons And since JavaScript runs on any browser, an HTML5 app will run on any mobile device (at least in theory). Speed has also improved.

Can iOS run HTML5?

iOS, Android, Windows, Mac, Linux, etc, all have HTML5 capabilities.

Does JavaScript work on mobile?

JavaScript frameworks are well-suited to mobile app development, as they can be used across a number of platforms, including iOS, Android, and Windows.


1 Answers

Depends on the type of touch event. For your standard browser click/mouse events these are emulated by the browser. As mentioned by Halst, just make your clickable elements big enough to work in a mobile environment.

If you want to use multitouch/gestures, it gets a little more interesting.

Webkit provides touchstart, touchmove, touchend, touchcancel. For single touch events support should be the same in both IOS Safari and Android Webkit. You could roll your own or use a library like jqTouch.

You can read more on how IOS Safari handles touch events. Events for Android don't seem to be as well documented, but you can read more on quirksmode touch support.

like image 59
scurker Avatar answered Oct 13 '22 23:10

scurker