jQTouch sometimes fires my click event two times which result in another element (often a link) getting clicked in the panel that shows immediately following a transition.
This issue has been discussed fairly extensively here but there is still not a good solution that I am aware of. In the forum sited above one gentleman suggests the following code as a solution but I am afraid that this will not work for me since I am using swipe and tap events:
allowClick = true;
function preventGhostClick(){
allowClick = false;
setTimeout(function(){
allowClick = true;
},800);
}
$('#element').bind('tap',function(){
if(!allowClick) return false;
app.utils.preventGhostClick();
// do stuff
});
Does anyone have any experience with this issue and any better solutions than the one above? Much thanks!
I'm seeing this issue on iPad only, perhaps related to a version of webkit. I've seen two solutions on the web I wanted to share.