create template packages
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s
All checks were successful
Deploy / Deploy to Production (push) Successful in 5m17s
This commit is contained in:
parent
f73b8cb90b
commit
aba8b4f37e
20 changed files with 414 additions and 526 deletions
11
assets/js/sliderBeforeAfter.js
Normal file
11
assets/js/sliderBeforeAfter.js
Normal 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}%`);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue