<table id="any-link">
<tr data-href="https://localhost/1">
<td>localhost</td>
</tr>
<tr data-href="https://localhost/2">
<td>localhost 2</td>
</tr>
</table>
jQuery('#any-link').bind('click', function(e)){
e.preventDefault();
alert($(this).closest("tr").data("href"));
}