Rendez-vous à 9h00, parking des Jouvencelles et parking de la Serra.
Avec la collaboration des écoles de ski de la Station des Rousses
11h30, pot de l’amitié offert par la Sogestar aux Jouvencelles.
Opération annulée en cas de neige.
document.addEventListener('DOMContentLoaded', function() {
var stickyElement = document.querySelector('.container-sticky');
var parentElement = document.querySelector('.container_sommaire_ancre');
var footerElement = document.querySelector('.kg-footer__blocks');
var ancreListElement = document.getElementById('ancre_list');
function checkStickyPosition() {
if (!stickyElement || !footerElement || !parentElement) return;
var stickyRect = stickyElement.getBoundingClientRect();
var footerRect = footerElement.getBoundingClientRect();
var parentRect = parentElement.getBoundingClientRect();
// Get current scroll position from the top of the document
var scrollY = window.scrollY || window.pageYOffset;
// Distance from sticky element to the footer
var stickyBottom = stickyElement.offsetTop + stickyElement.offsetHeight;
var footerTop = footerElement.offsetTop;
// Add the sticky-stop class if the sticky element would overlap the footer
if (stickyBottom + scrollY > footerTop) {
stickyElement.classList.add('sticky-stop');
} else {
stickyElement.classList.remove('sticky-stop');
}
}
function updateResponsiveStyles() {
if (window.innerWidth <= 1200) {
// Supprimer l'ID 'ancre_list' pour les petits écrans
if (ancreListElement && ancreListElement.id) {
ancreListElement.removeAttribute('id');
console.log('1')
}
} else {
// Réappliquer l'ID si nécessaire sur les écrans plus grands
if (ancreListElement && !ancreListElement.id) {
ancreListElement.id='ancre_list' ;
}
}
}
// Appeler les fonctions au chargement de la page
checkStickyPosition();
updateResponsiveStyles();
// Réagir aux événements de défilement et de redimensionnement
window.addEventListener('scroll', checkStickyPosition);
window.addEventListener('resize', function() {
updateResponsiveStyles();
checkStickyPosition();
});
// Observer les changements de dimension pour appliquer les styles immédiatement
var resizeObserver=new ResizeObserver(function() {
updateResponsiveStyles();
});
resizeObserver.observe(document.body);
});