Click listener on iPhone / iPad

Civeawavy

New Member
In a PC, Mac and any Android device, when you click or touch an image, the showItem function is called, and I display the image in full screen mode.However, when I test this in Iphone / iPad, when you first touch the image, the hover event is fired, and you need to touch another time to actually activate the function. How can I overcome this?jQuery \[code\]this1.on("click", function(evt){ evt.preventDefault(); evt.stopPropagation(); showItem(this1);});\[/code\]PS: the this1 variable, is the img with the .item class belowHTML / PHP\[code\]<div class='galleryImage'> <span class='hidden' title='images/galleries/".$category."/".$dir[$i]."' ></span> <img class='item image' src='http://stackoverflow.com/questions/15728746/images/galleries/".$category."/".$dir[$i]."' alt='image-jpg' /> <img src='http://stackoverflow.com/questions/15728746/images/ajax-small.gif' class='galleryLoader' alt='galleryLoader' /></div>\[/code\]
 
Back
Top