I have a table to show all the data from my API. My code is look like this :
<div class="table-responsive">
<h1>List Existing Node</h1>
<br/>
<table class="table table-bordered table-striped" id="node_table">
<tr>
<th>Node Id</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Location</th>
</tr>
</table>
</div>
<script>
$(document).ready(function() {
$.getJSON("/api/node/", function(data){
var node_data = '';
$.each(data, function(key, value){
node_data += '<tr>';
node_data += '<td>'+value.node_id;
node_data += '<td>'+value.latitude;
node_data += '<td>'+value.longitude;
node_data += '<td>'+value.location;
node_data += '</tr>';
});
$('#node_table').append(node_data);
console.log(data);
});
});<script>
The problem is I want all of the cell table in Node Id column can be clicked using href link.
For example when I click a cell (ex: node 1 or node 2 or node n) in Node Id column and then the page will be redirect to https://facebook.com
How can I do that?