User:Sur/common.js: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m Blanked the page
Tag: Blanking
Sur (talk | contribs)
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`;
    });
});