HTML tag binding with Italic tag
I have html.
<a href="#"> <i class="some-bg" /> Some Text </a> And some javascript.
$("a").bind("touchstart", function (e) { e.preventDefault(); console.log("Tag: " + e.target); console.log("Tag Name: " + e.target.tagName); }); Answer.
Tag: [object HTMLElement] Tag Name: I Why? Shouldn't it be an anchor?
UPDATED
$("a, a *").bind(function() { e.stopPropagation(); // other stuff }); Will this do the trick?
+6