Jump to content
Search Community

Problems with ScrollTrigger.batch

GM_sql test
Moderator Tag

Recommended Posts

2071165635_Beztytuu.thumb.png.d3ee7c645af0fca6e531a4f4d6d06e9a.png

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...