User:TheMcr/common.js: Difference between revisions
Boobpedia - Encyclopedia of big boobs
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (14 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
document.addEventListener( | 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 | |||
}); | |||
}); | }); | ||
}); | }); | ||
Latest revision as of 15:59, 5 April 2025
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
});
});
});