|
Tags: Blanking Manual revert |
(5 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| document.addEventListener('DOMContentLoaded', function() {
| |
| const infoboxes = document.querySelectorAll('.stat-infobox');
| |
|
| |
|
| infoboxes.forEach(function(infobox) {
| |
| const hoverBox = infobox.querySelector('.stat-infobox-hover');
| |
| const table = hoverBox.querySelector('.stat-infobox-table');
| |
|
| |
| // On hover, adjust the height of the stat-infobox to match the hover box
| |
| infobox.addEventListener('mouseenter', function() {
| |
| const hoverHeight = hoverBox.offsetHeight;
| |
| infobox.style.height = hoverHeight + 'px';
| |
| });
| |
|
| |
| // Reset height when hover ends
| |
| infobox.addEventListener('mouseleave', function() {
| |
| infobox.style.height = 'auto';
| |
| });
| |
| });
| |
| });
| |