32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
// MSP Connect - Global Interactivity
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Navbar scroll effect
|
|
const navbar = document.querySelector('.navbar');
|
|
window.addEventListener('scroll', () => {
|
|
if (window.scrollY > 10) {
|
|
navbar.style.boxShadow = '0 4px 12px rgba(0,0,0,0.05)';
|
|
} else {
|
|
navbar.style.boxShadow = 'none';
|
|
}
|
|
});
|
|
|
|
// Fade-in effect for cards
|
|
const cards = document.querySelectorAll('.card');
|
|
cards.forEach((card, index) => {
|
|
card.style.opacity = '0';
|
|
card.style.transform = 'translateY(10px)';
|
|
card.style.transition = 'all 0.4s ease-out';
|
|
setTimeout(() => {
|
|
card.style.opacity = '1';
|
|
card.style.transform = 'translateY(0)';
|
|
}, index * 100);
|
|
});
|
|
|
|
// Tooltip simulation/Simple alerts
|
|
const buttons = document.querySelectorAll('.btn-outline');
|
|
buttons.forEach(btn => {
|
|
if (btn.getAttribute('title')) {
|
|
// Natural browser title is fine for now
|
|
}
|
|
});
|
|
}); |