Clickable links added to top scorers container on league pages
This commit is contained in:
@@ -7,6 +7,16 @@
|
|||||||
margin-bottom: 10px; /* Adjust the value as needed */
|
margin-bottom: 10px; /* Adjust the value as needed */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#top-scorers-stats-container tbody tr:hover {
|
||||||
|
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
|
||||||
|
|
||||||
|
#club-name-column {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#goals-column {
|
#goals-column {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Add click event listener to club logos
|
// Add click event listener to club logos
|
||||||
document.querySelectorAll('#table-club-logo, #club-name, #top-scorers-logo').forEach(element => {
|
document.querySelectorAll('#table-club-logo, #club-name, #top-scorers-logo, #club-name-column').forEach(element => {
|
||||||
element.addEventListener('click', (event) => {
|
element.addEventListener('click', (event) => {
|
||||||
// Get the club ID from the clicked club logo's clubID attribute
|
// Get the club ID from the clicked club logo's clubID attribute
|
||||||
const clubId = element.getAttribute('clubID');
|
const clubId = element.getAttribute('clubID');
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<td id="goals-column">{{goals}}</td>
|
<td id="goals-column">{{goals}}</td>
|
||||||
<td><img id="top-scorers-logo" clubID="{{team.team_id}}" src="{{team.team_crest}}" alt="{{table.team_name}} Crest"></img></td>
|
<td><img id="top-scorers-logo" clubID="{{team.team_id}}" src="{{team.team_crest}}" alt="{{table.team_name}} Crest"></img></td>
|
||||||
<td id="player-name-column">{{player.player_name}}</td>
|
<td id="player-name-column">{{player.player_name}}</td>
|
||||||
<td id="club-name-column">{{team.team_name}}</td>
|
<td id="club-name-column" clubID="{{team.team_id}}">{{team.team_name}}</td>
|
||||||
<td>{{games_played}}</td>
|
<td>{{games_played}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
Reference in New Issue
Block a user