Toggle V2
This commit is contained in:
parent
1b21d364e7
commit
0c2eea73ec
@ -159,17 +159,15 @@ function renderTable() {
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
fetchData();
|
fetchData();
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
const toggleBtn = document.getElementById('toggle-matches-btn');
|
||||||
const toggleBtn = document.getElementById('toggle-matches-btn');
|
if (toggleBtn) {
|
||||||
if (toggleBtn) {
|
toggleBtn.textContent = 'Show All Matches';
|
||||||
toggleBtn.textContent = 'Show All Matches';
|
toggleBtn.onclick = () => {
|
||||||
toggleBtn.onclick = () => {
|
showAllMatches = !showAllMatches;
|
||||||
showAllMatches = !showAllMatches;
|
toggleBtn.textContent = showAllMatches ? 'Show Future Matches' : 'Show All Matches';
|
||||||
toggleBtn.textContent = showAllMatches ? 'Show Future Matches' : 'Show All Matches';
|
renderTable();
|
||||||
renderTable();
|
};
|
||||||
};
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user