This commit is contained in:
Roman Pyrih
2025-09-03 16:00:09 +02:00
parent eed2bf7ab1
commit b17f2f4766
6 changed files with 795 additions and 144 deletions

View File

@@ -3,11 +3,6 @@ jQuery(function ($) {
gsap.registerPlugin(ScrollTrigger)
function initSticky() {
if ($(window).width() <= 992) {
ScrollTrigger.getByClass('heroImagePin')?.kill()
return
}
ScrollTrigger.getById('heroImagePin')?.kill()
const $pin = $('.box-1 .col-2')
@@ -36,9 +31,11 @@ jQuery(function ($) {
})
}
$(window).on('load', initSticky)
if ($(window).width() > 992) {
$(window).on('load', initSticky)
$(window).on('resize orientationchange', () => ScrollTrigger.refresh())
$(window).on('resize orientationchange', () => ScrollTrigger.refresh())
}
}
})