I have versy simple table in html like below:
<table>
<tbody id="myTable">
</tbody>
</table>
I am adding rows dynamicly from json file like:
<script>
fetch("data.json")
.then(response => response.json())
.then(data => {
let table = document.getElementById("myTable");
for(let i = 0; i < data.length; i++){
table.innerHTML +=
`<tr>
<td>${data[i].title}</td>
<td>${data[i].country}</td>
<td>${data[i].writer}</td>
<td>${data[i].genre}</td>
</tr>`;
};
});
</script>
Could you tell me how can I add action onmouseover for every row? This action should show very simple popup with data from data[i].details.