Ponz
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Ponz
-
-
Hi!
I found this code and I immediately tried to use it in my project because it was exactly what I needed.. it wasn't easy to implement gsap in Elementor but it seems to me it works well enough except for a strange behavior at the end of the scroll.. could you help me to solve this?..my code is:
<script> ;(function(){ var chck_if_gsap_loaded = setInterval(function(){ if(window.gsap && window.ScrollTrigger){ gsap.registerPlugin( ScrollTrigger ); myfunction(); clearInterval(chck_if_gsap_loaded); } }, 500); function myfunction(){ let cont = document.querySelector("#container"); gsap.to(".slide", { ease: "none", x: () => -(cont.scrollWidth - window.innerWidth), scrollTrigger: { trigger: cont, pin: cont, start: "center center", end: () => "+=" + (cont.scrollWidth - window.innerWidth), scrub: true, invalidateOnRefresh: true, markers: true, } }); } })(); </script>
Scrolltrigger with images as slider
in GSAP
Posted
Found the solution! ..it was an Elementor transition property..
Thanks for the code!