jQuery Mobile tap bug : same target twice
- by hugo
I'm working on displaying some text in an UIWebView on iOS.
I'd like to get the content of the HTML element tapped by the user. If he taps on a paragraph for example, a popup shows the paragraph content.
I'm using jQuery Mobile to achieve this.
Here's what I'm doing :
$('body').tap(function(e) {
var tappedElement = $(e.target);
alert(tappedElement.text());
});
It works for the first tap. The second tap no matter where it is, returns the same text.
The event seems to be ok but the target property of the second tap is wrong. On the third tap all comes back to normal and so on ...
What am I missing here ?
thx