I have the following HTML:
<a href="#" data-secID="1901">
<img src="pencil.png" title="Edit" />
</a>
And the following jQuery that I expect to alert the secID of 1901 to the screen, but instead alerts 'undefined' to the screen.
$(document).on("click", "a[data-secID]", function ($e) {
alert($(this).data('secID'));
$e.preventDefault();
});
Why am I get 'undefined' instead of 1901?