Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handle iPhone Events (like slide-left) in Mobile Web Site

Does the iPhone browser have special events that I can hook into with Javascript? For instance, if the users slides to the left, I would like to perform a certain action. If there are events like this available, it would be nice to see a reference for all of them. ideally, there will someday be a standard for all touch-screen mobile browsers.

like image 827
Josh Stodola Avatar asked Nov 14 '09 04:11

Josh Stodola


1 Answers

You can access multi-touch events and gestures, but there is a fair amount of under-the-hood plumbing you'll likely have to handle yourself. Here is Apple's guide:

https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html

As an example of what can be done with a MobileSafari web app, check out this article on Apple's in-house "PastryKit":

https://daringfireball.net/2009/12/pastrykit

Particularly, you can use Safari on Windows or Mac (if you enable the developer menu in the preferences and set the useragent to MobileSafari 3.x) and check out the way it works.

Another UI library to look at is jQTouch:

http://www.jqtouch.com/

like image 125
Frank Schmitt Avatar answered Oct 28 '22 10:10

Frank Schmitt