pOri_A Posted December 20, 2020 Share Posted December 20, 2020 (edited) Hey... I can't create a demo for this problem cause in my local version every things are fine but in my online version gallery section messed up when I scroll from the top of the site this problem will happened ( image ) but when I refresh page or resize page everything gets fine again . this is the cod of the section that don't do the job // some pic window.addEventListener('load', function() { ScrollTrigger.saveStyles("#somePic,#imgMain "); const somePic = document.querySelector('#somePic'); const imgmain = somePic.querySelector('#imgMain'); gsap.fromTo(imgmain,1,{scaleX:3.3, scaleY:3.3,y:100 },{scaleX:1, scaleY:1,x:0,y:0, scrollTrigger:{ trigger:somePic, start:'top top', end:'bottom+=1500 top', pin:true, scrub: 1, markers:true }}); }); Edit: I realize that there is another part effecting on this galleryImg and that is three moving img before this part .... is it ScrollTrigger Refresh effect? $(".collection").each(function() { var tl = gsap.timeline(); var miniPic = $(this).find(".mini-pic"); var miniPicDiv = $(this).find(".mini-pic-move"); var tl2 = gsap.timeline(); tl2.to(miniPicDiv,{ y:50, scrollTrigger:{ trigger:this, start:'top center', end:'bottom+=500 center', scrub: 2 }}); tl.to(miniPic,{scale:1.2 ,scrollTrigger:{ trigger:this, start:'top center', end:'bottom+=500 center', scrub: 1 }}); }) at the end Sorry For My Bad English Edited December 21, 2020 by pOri_A Link to comment Share on other sites More sharing options...
ZachSaucier Posted December 21, 2020 Share Posted December 21, 2020 Hey pOri_A. It's really hard to debug this sort of thing blindly. There's some code that's causing the issue that you're facing somewhere. To figure out where that code lies you need to make a minimal demo of it 🙂 It's not just a way to get you to do more work. It's part of your work, regardless of whether or not you get help here in these forums. So if you'd like help please make a minimal demo of the issue. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now