| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/successkpi/wp-content/themes/successkpi/blocks/info-cards-row/ |
Upload File : |
//start on hover gradient effect
document.addEventListener("DOMContentLoaded", function () {
const cards = document.querySelectorAll('.sk-performance-feature-card');
const gradientBox = document.querySelector('.gradient-box');
const container = document.querySelector('.sk-enterprise-performance-features');
if (!cards.length || !gradientBox || !container) return;
cards.forEach(card => {
card.addEventListener('mouseenter', () => {
const cardRect = card.getBoundingClientRect();
const containerRect = container.getBoundingClientRect();
const targetTop = cardRect.top - containerRect.top;
const targetLeft = cardRect.left - containerRect.left;
gradientBox.style.transition = 'none';
gradientBox.style.top = '100%';
gradientBox.style.opacity = '0';
void gradientBox.offsetWidth;
gradientBox.style.transition = 'transform 0.5s ease, opacity 0.4s ease, left 0.4s ease, top 0.4s ease';
gradientBox.style.left = `${targetLeft + cardRect.width / 2 - 150}px`;
gradientBox.style.top = `${targetTop + cardRect.height / 2 - 150}px`;
gradientBox.style.opacity = '1';
gradientBox.style.transform = 'translateY(0)';
});
card.addEventListener('mouseleave', () => {
gradientBox.style.opacity = '0';
gradientBox.style.transform = 'translateY(100%)';
});
});
});
//end hover gradient effect