The following is the snippet for handling click event on mobile devices:
<script>
var touchflag = false;
$("img").bind("touchstart", function(event)
{
touchflag = false;
});
$("img").bind("touchmove", function(event)
{
touchflag = true;
});
$("img").bind("touchend", function(event)
{
if(touchflag) return;
name = $(this).parent().attr("id");
window.open("pageToOpen.html?q="+name,"_self");
});
</script>
No comments:
Post a Comment