User:TheMcr/common.js
Boobpedia - Encyclopedia of big boobs
Jump to navigationJump to search
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.addEventListener("DOMContentLoaded", function () {
const table = document.querySelector('.wikitable');
// Apply fade-in effect
table.style.opacity = 0;
table.style.transition = "opacity 2s";
setTimeout(function() {
table.style.opacity = 1;
}, 10);
// Hover effect for each row
const rows = table.querySelectorAll('tr');
rows.forEach(row => {
row.addEventListener('mouseenter', function() {
row.style.transform = "scale(1.05)";
row.style.transition = "transform 0.3s ease, background-color 0.3s ease";
row.style.backgroundColor = "#f0f0f0";
});
row.addEventListener('mouseleave', function() {
row.style.transform = "scale(1)";
row.style.backgroundColor = ""; // reset background color
});
});
});