forked from lucaspatenaude/ScoreSpot
Clicklable links added to top scorers table
This commit is contained in:
@@ -24,7 +24,7 @@ const fetchLeagueScorerData = async (req, res, next) => {
|
||||
player_name: player.player.name,
|
||||
},
|
||||
team: {
|
||||
team_id: player.player.id,
|
||||
team_id: player.team.id,
|
||||
team_name: player.team.name,
|
||||
team_crest: player.team.crest,
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Add click event listener to club logos
|
||||
document.querySelectorAll('#table-club-logo, #club-name').forEach(element => {
|
||||
document.querySelectorAll('#table-club-logo, #club-name, #top-scorers-logo').forEach(element => {
|
||||
element.addEventListener('click', (event) => {
|
||||
// Get the club ID from the clicked club logo's clubID attribute
|
||||
const clubId = element.getAttribute('clubID');
|
||||
|
||||
Reference in New Issue
Block a user