tap event in the Phonegap

Viewed 3211

I find a problem that when I "tap" or "click" an element it will be trigger twice in my recent project.For example:

......

<div id='target'></div>   
......


<script>

  $('#target').click(function(){alert('touched!')});

</script>

and then it will alert "touched" twice!!!!

I thought if I use a gesture library I could fix it so I try Hammer.js.But it seems that the problem still can't be fixed.I am so confused by this and really hope someone could give me some advice.Thanks!!!

5 Answers
Related