I'm pretty new to Jquery Mobile and I'm trying to trig a tap event. It's working. If I click the div the class will be added. But if I click the a tag the class will be added to the a tag too. How can I make the class be added just to the div, no matter if I click the div or a?
Here is the code:
<div id="measure-success">
<div class="measures"><a href="">How long to prepare each campaign?</a></div>
<div class="measures"><a href="">Size of Database</a></div>
</div>
$(function() {
$("#measure-success .measures").bind("tap", tapHandler);
function tapHandler (event) {
$(event.target).addClass("tap");
}
});