Skip to content

Commit

Permalink
Update 2023-03-21-tables.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jS5t3r authored Nov 4, 2024
1 parent 7d5709f commit 9b58d36
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions _posts/2023-03-21-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,24 @@ Below, you'll find the comprehensive paper list. I've also provided [JSON](https
<thead>
<tr class="tr-class-1">
<th data-field="date" data-sortable="true" data-width="50">date</th>
<th data-field="title">title</th>
<th data-field="author">author(s)</th>
<th data-field="title" data-sortable="true" >title</th>
<th data-field="author" data-sortable="true" >author(s)</th>
</tr>
</thead>
</table>

<script>
document.addEventListener("DOMContentLoaded", function() {
var rows = document.getElementById('link').getElementsByTagName('tbody')[0].rows;
Array.from(rows).forEach(row => {
row.addEventListener("click", function() {
console.log(this.getAttribute('data-href'));
// Uncomment the line below to navigate to the link when a row is clicked
// window.location.href = this.getAttribute('data-href');
});
});
});
</script>

## Acknowledgment

Expand Down

0 comments on commit 9b58d36

Please sign in to comment.