Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
document.querySelectorAll('.tooltip-cell').forEach(cell => { const tooltip = cell.querySelector('.tooltip-text'); cell.addEventListener('mouseenter', (event) => { // Get the cell's position relative to the viewport const rect = cell.getBoundingClientRect(); // Position the tooltip based on cell position tooltip.style.position = 'fixed'; tooltip.style.top = `${rect.top - 10}px`; // Position a bit above the cell tooltip.style.left = `${rect.right + 10}px`; // Position to the right of the cell tooltip.style.visibility = 'visible'; tooltip.style.opacity = '1'; tooltip.style.zIndex = '10000'; // Ensure tooltip appears above everything }); cell.addEventListener('mouseleave', () => { tooltip.style.visibility = 'hidden'; tooltip.style.opacity = '0'; }); });