Shrink Section On Scroll With GSAP & ScrollTrigger In Elementor Pro

Share on facebook
Facebook
Share on twitter
Twitter
Share on reddit
Reddit
Share on whatsapp
WhatsApp

Source Code

				
					<script type="rocketlazyloadscript">

function run_gsap(){
    let gsap_loaded = setInterval(function(){
     if(window.gsap && window.ScrollTrigger){
         gsap.registerPlugin(ScrollTrigger);
             bg_section();
         clearInterval(gsap_loaded);
     }
 }, 500);
	
	function bg_section(){
		gsap.from('.bg-section',{
			scrollTrigger:{
				trigger:'.bg-section',
				start:'-350px center',
				end: '300px center',
				scrub:true
			},
			width:'80%',
			duration:1
		});
	}
}
run_gsap();

</script>

<script type="rocketlazyloadscript" data-minify="1" src="https://urielsoto.com/wp-content/cache/min/1/ajax/libs/gsap/3.9.0/gsap.min.js?ver=1642386555" defer></script>
<script type="rocketlazyloadscript" data-minify="1" src="https://urielsoto.com/wp-content/cache/min/1/ajax/libs/gsap/3.9.0/ScrollTrigger.min.js?ver=1642386555" defer></script>
				
			
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

More to explorer

Toggle Between Icons and Images On Click With Elementor

https://youtu.be/kEL6W446z90 Toggle Icon Javascript Toggle Icon CSS .toggle-pause .elementor-icon i::before{ content: ‘f04c’; } Toggle Image Javascript Toggle Image CSS .new-img img{ content:url(”);

0
Would love your thoughts, please comment.x
()
x

45 Minute Wordpress Support

Get your Wordpress questions answered and your Wordpress issues resolved.