DW92 Posted February 22 Share Posted February 22 Hi. I'm trying to utilize helper function "seamlessLoop". I'm trying to use this example: , but have some problems, with that: 1. When I use const boxes = gsap.utils.toArray(".box"); and passing that constant to horizontalLoop() function, this happens: but when I pass html selectors directly '.js--pelion-reviews-tape .wrapper .box' it works fine as a loop/marquee. The problem I get here is that onChange method doesn't work (doesn't add and remove "active" class). Here is my code: See the Pen oNVRqJb by DW922 (@DW922) on CodePen The only thing I want to achieve here is to have a "marquee", with "active" (center I guess) element highlighted. Thanks for all your help See the Pen gOvvJee by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Toso Posted February 22 Share Posted February 22 h1 @DW92 maybe something like 🤔 this one without any functions See the Pen PoLvaKM?editors=1010 by ahmed-attia (@ahmed-attia) on CodePen in your demo, you didn't load gsap so this code won't work in a million years 😂 here is how you load gsap or just fork this demo it contains all the plugins See the Pen OPqpRJ by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
DW92 Posted February 22 Author Share Posted February 22 Hi @Toso Thanks for your help! I'm just showcasing this code on codepen. Testing it on my local enviroment, so I'm sure gsap is working just fine (with problems I mentioned). Is it possible to make "slides" jump, one after another, instead of smooth movement, in your example? Link to comment Share on other sites More sharing options...
Solution Toso Posted February 22 Solution Share Posted February 22 something like? i created a setInterval and it fires every 2s you can play with the duration and ease to get the effect you want See the Pen KKELGWz?editors=0010 by ahmed-attia (@ahmed-attia) on CodePen 3 Link to comment Share on other sites More sharing options...
DW92 Posted February 22 Author Share Posted February 22 @Toso Great! What a Wizzard! Thanks a lot! 1 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