Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Event listener for the DOMContentLoaded event.
- * This function sets up click event listeners for the career data and last season stats buttons.
- *
- * @function
- */
- document.addEventListener('DOMContentLoaded', function() {
- /**
- * Event listener for the 'click' event on the 'btnCareerData' button.
- * This function shows the career data section and hides the last season data section.
- *
- * @function
- */
- document.getElementById('btnCareerData').addEventListener('click', function() {
- // Show career data and hide last season data
- document.getElementById('careerData').classList.remove('d-none');
- document.getElementById('lastSeasonData').classList.add('d-none');
- // Highlight the active button
- this.classList.add('active');
- document.getElementById('btnLastSeasonStats').classList.remove('active');
- });
- /**
- * Event listener for the 'click' event on the 'btnLastSeasonStats' button.
- * This function shows the last season data section and hides the career data section.
- *
- * @function
- */
- document.getElementById('btnLastSeasonStats').addEventListener('click', function() {
- // Show last season data and hide career data
- document.getElementById('lastSeasonData').classList.remove('d-none');
- document.getElementById('careerData').classList.add('d-none');
- // Highlight the active button
- this.classList.add('active');
- document.getElementById('btnCareerData').classList.remove('active');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment