User:Sur/common.js: Difference between revisions
< User:Sur
m Blanked the page Tag: Blanking |
m testing height matching |
||
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'); | |||
// Adjust the infobox height to match hover box height if needed | |||
infobox.style.height = `${hoverBox.offsetHeight}px`; | |||
}); | |||
}); |
Revision as of 18:22, 22 September 2024
document.addEventListener("DOMContentLoaded", function() {
const infoboxes = document.querySelectorAll('.stat-infobox');
infoboxes.forEach(function(infobox) {
const hoverBox = infobox.querySelector('.stat-infobox-hover');
// Adjust the infobox height to match hover box height if needed
infobox.style.height = `${hoverBox.offsetHeight}px`;
});
});