A few days ago I received a request to tweak a webpage for the iPhone.
The owner had a database composed of multiple screens, many of which were heavily used by iPhone wielders. He wanted a specific iPhone version with navigational support for page flipping. 30 minutes later I found myself the the murky waters of device dependent web code in search of a html page flipping solution for the iPad.
I started googling for ‘ipad jquery’ terms and quickly found plugins there were tagged ‘ipad’: Seems there are a few ready-made plugins for jQuery like…
- iPhone/iPad doubletap event handler
- Mobile Slideshow
- jQuery Touchwipe iPhone, iPad, iPod Touch Gestures Event
- jScrollTouch iPhone / iPad scrollable content
- iPhone Pinch Gestures
The touchwipe plugin lead me to the homepage of netCU where I noted the interesting events ‘touchstart’ and ‘touchmove’.
A further search led me to a great set of iPad specific articles at htmlpad and from there to the Apple developer site in case I wanted the API description straight from the horse’s mouth.
The pertinent event handlers needed for my projects are ontouchmove, ontouchend, ontouchcancel, orientationchange, gesturestart, gesturechange, and gestureend.
Armed with these sites, I now feel ready to grapple with the tasks at hand (pun intended). For the coders out there, have fun with the links I posted. I believe they are a good starting point! For the rest of you, I hope to show some code in my next article here.