|
|
@ -1,10 +1,10 @@
|
|
|
|
import {tns} from "tiny-slider/src/tiny-slider";
|
|
|
|
import {tns} from "tiny-slider/src/tiny-slider";
|
|
|
|
|
|
|
|
|
|
|
|
var parallaxSlider ;
|
|
|
|
var parallaxSlider;
|
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
document.querySelectorAll('#ParallaxSliderTns')?.forEach(function (el) {
|
|
|
|
document.querySelectorAll('#ParallaxSliderTns')?.forEach(function (el) {
|
|
|
|
if (el.classList.contains('.tns-slider')){
|
|
|
|
if (el.classList.contains('.tns-slider')) {
|
|
|
|
console.log('ignore');
|
|
|
|
console.log('ignore');
|
|
|
|
return 'ignore';
|
|
|
|
return 'ignore';
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -56,13 +56,18 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Apply parallax on scroll and resize
|
|
|
|
try {
|
|
|
|
window.addEventListener('scroll', applyParallax);
|
|
|
|
|
|
|
|
window.addEventListener('resize', applyParallax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initial application
|
|
|
|
// Apply parallax on scroll and resize
|
|
|
|
applyParallax();
|
|
|
|
window.addEventListener('scroll', applyParallax);
|
|
|
|
|
|
|
|
window.addEventListener('resize', applyParallax);
|
|
|
|
|
|
|
|
|
|
|
|
// Reapply parallax when tiny-slider changes slides
|
|
|
|
// Initial application
|
|
|
|
parallaxSlider.events.on('transitionEnd', applyParallax);
|
|
|
|
applyParallax();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reapply parallax when tiny-slider changes slides
|
|
|
|
|
|
|
|
parallaxSlider.events.on('transitionEnd', applyParallax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|