create template packages
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s

This commit is contained in:
Julie Blanc 2026-02-25 18:22:13 +01:00
parent f73b8cb90b
commit aba8b4f37e
20 changed files with 414 additions and 526 deletions

View file

@ -0,0 +1,11 @@
export function initSliderBeforeAfter(container = document){
const slidersBeforeAfter = container.querySelectorAll('.slider-before-after');
slidersBeforeAfter.forEach(function (sliderContainer, index) {
const sliderInput = sliderContainer.querySelector('.slider');
if (sliderInput) {
sliderInput.addEventListener('input', (e) => {
sliderContainer.style.setProperty('--position', `${e.target.value}%`);
});
}
});
}