I have dynamically generated links like
<a name="details" id="1" href="javascript:;">Details</a>
When one of them clicked I want to process this event with javascript code like this
$(document).ready(function () {
var a = document.getElementsByName('details').item(0);
a.on('click', function () {
$.ajax({
///
});
});
});
However, even though it seems to find hyperlinks quite perfectly, on click event it doesn't enter the function.
What is wrong with the implementation?