I would like to be able to disable the iPad touch & hold functionality for everything on my site except for one image. I’ve managed to do this for all images using the:
event.preventDefault();
event.stopPropagation();
on touchstart & touchmove events, and this works great. But I haven’t been able to work out how to allow this functionality for a particular image on my site.
Any help would be appreciated.
Cheers,
Helmut
OK I’ve worked out a way to do this. Basically I put a condition around those event statement, like this:
I only did this for those functions called at the touchstart event, as I didn’t need to (or want to) prevent defaults for any other touch events. All I needed to do then was to set the saveImage Boolean appropriately so that it was only true when I was touching the image I wanted to save (which was pretty straight forward).