Skip to content

Commit

Permalink
Use datatables api to get id
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Pucci committed Jan 31, 2019
1 parent a893501 commit b276167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ document.addEventListener("DOMContentLoaded", (event) => {
rowId: (convertedData) => { return `row-${convertedData.id}`},
createdRow: function(row, data, dataIndex) {
row.addEventListener("mouseover", (event) => {
emphasizeShot(document.getElementById(`shot-${row.children[0].innerHTML}`));
emphasizeShot(document.getElementById(`shot-${data.id}`));
emphasizeRow(row);
});
row.addEventListener("mouseout", (event) => {
deemphasizeShot(document.getElementById(`shot-${row.children[0].innerHTML}`));
deemphasizeShot(document.getElementById(`shot-${data.id}`));
deemphasizeRow(row);
});
},
Expand Down

0 comments on commit b276167

Please sign in to comment.