2024-01-12 17:05:04 +01:00
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
2024-01-12 21:09:55 +01:00
|
|
|
const burgerMenu = document.querySelector('.burger-menu');
|
|
|
|
const navLinks = document.querySelector('.nav-links');
|
2024-01-12 17:05:04 +01:00
|
|
|
|
2024-01-12 21:09:55 +01:00
|
|
|
burgerMenu.addEventListener('click', function () {
|
|
|
|
navLinks.classList.toggle('show');
|
2024-01-12 17:05:04 +01:00
|
|
|
});
|
2024-01-12 21:09:55 +01:00
|
|
|
});
|
2024-01-13 00:52:08 +01:00
|
|
|
|
|
|
|
function scrollToTop() {
|
|
|
|
window.scrollTo({
|
|
|
|
top: 0,
|
|
|
|
behavior: 'smooth'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Afficher ou masquer le bouton en fonction de la position de défilement
|
|
|
|
document.addEventListener('scroll', function () {
|
|
|
|
const scrollTopBtn = document.getElementById('scrollTopBtn');
|
|
|
|
if (window.scrollY > 200) {
|
|
|
|
scrollTopBtn.style.display = 'block';
|
|
|
|
} else {
|
|
|
|
scrollTopBtn.style.display = 'none';
|
|
|
|
}
|
|
|
|
});
|