A href link won't fire, if included within another click event
Good day,
Can you please help me. I have a datatable. When a user click on a row for the first time, it will open a detail row under the top row. Within the detail row, I have a href hyperlink, and when this is clicked it supposed to link to another page. But the hyperlink didn't fire at all.
To elaborate further, if the first column of a top row is clicked, then a detail-row will be displayed under it.
In the detail row, there is defined a hyperlink to another page.
My code snippet is below:
$('#tblTutors tbody').on( 'click', 'tr td:nth-child(1)', function () { ...
-- the hyperlink is defined in here
<a href="
http://www.w3schools.com" target="_blank">' + WebName + '</a>
.. }
My problem is, then a user click the hyperlink, it will not fire at all. The outer $('#tblTutors tbody').on( 'click'... will be fired instead.
So is there a way to solve this?
Hope you can give me some help..Thanks.