GM_sql Posted March 8, 2022 Share Posted March 8, 2022 Hi, I have a problem with ScrollTrigger.batch. I had decided and have switched to mobile version as a starting layout and this script doesn't work in case of other predefined layouts. What's wrong? Seems the opacity is still set to 0. I have to manually shrink/expand browser window to push it. article { opacity: 0; } function showArticles() { ScrollTrigger.batch(articles, { onEnter: batch => gsap.to(batch, {autoAlpha: 1, stagger: 0.15}), }); } (articles && articles.length > 0) ? showArticles() : null; Link to comment Share on other sites More sharing options...
OSUblake Posted March 8, 2022 Share Posted March 8, 2022 Hi GM_sql, It's hard to answer to a question without a minimal demo showing the issue. Thanks! Link to comment Share on other sites More sharing options...
GM_sql Posted March 9, 2022 Author Share Posted March 9, 2022 Thanks @OSUblake, seems I've found the solution and it's not a plugin issue. I had 3 separated css files (thus it's not possible to replicate the code in codepen) that was loading in the order (mobile - all rules, tablet, desktop). 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