Reputation: 19173
I was wondering how to implement a sort of touch-event on a page like this.
So, instead of when you tap on the part of the screenshot to magnify, it actually follows your finger as it drags across the screen.
Are there certain ways to make this work on iOS devices.
Upvotes: 1
Views: 438
Reputation: 11
http://jgestures.codeplex.com/
A jQuery plugin that enables you to add gesture events such as 'pinch', 'rotate', 'swipe', 'tap' and 'orientationchange' just like native jQuery events. Includes event substitution: a "tapone" event can be triggered by "clicking", a "swipe" by performing a swipe-ish mousegesture.
Example jQuery('#swipe').bind('swipeone',eventHandler);
Upvotes: 1
Reputation: 1037
From my experience there is not a canned solution to do exactly what it is you are looking for. That said, there are frameworks that are gaining serious traction that will reduce the workload involved to implement something like this. Sencha Touch is one of my favorites. You could access the touch event API in its framework and tie that event to a custom script you would need to write that handles the magnification for you. The magnification script in and of itself would be a rather sizable one and would probably only perform well on newer touch devices (e.g. iPhone 4) that have the browser juice to handle such a graphically heavy feature.
Upvotes: 1
Reputation: 11597
You could look into using the touchstart
event, althought, I am not sure if it gives you the continuous feedback you would need to accomplish this effect.
Upvotes: 0