I want to make a site for reservation table in restaurant and I want when click on to send me in other window and there to be reservation. I have a problem because with ajax I get data from json file and send it to html table but idk how to use click function in that.
<table id="table1" class="table table-hover container-fluid text-white" style="max-width:64%;">
<thead class="thead-light">
<tr>
<th scope="col">Broj stola</th>
<th scope="col">Pozicija</th>
<th scope="col">Broj stolica</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<script>
$(document).ready(function(){
$.ajax({
url:"db.json",
dataType:"json",
success:function(data){
$(data.stolovi).each(function(index,value){
var stol ="<tr><td>"+value.id+"</td><td>"+
value.pozicija+"</td><td>"+value.brojMjesta+"</td><tr>";
$('#table1').append(stol);
});
}
});
});
</script>