Jump to content
Search Community

Nicoletta

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Nicoletta

  1. 4 hours ago, Nicoletta said:

    Thanks so much! However, I'm finding difficult to show the number of cards I actually have: let's say I have 4 cards in my code and I want to show 4, this way it only shows three. Is that possible? I tried changing the values in the code but the only thing it does is messing up the animation

    Rephrasing this: with the latest solution you proposed, it cannot be possible to have a number of `card` divs that is equal to the `cardsToShow` variable, which is exactly the use case I'm after

  2. 7 hours ago, GreenSock said:

    I've updated the CodePen to make it easier to show however many cards  you want:

     

     

     

    Does that help?

    Thanks so much! However, I'm finding difficult to show the number of cards I actually have: let's say I have 4 cards in my code and I want to show 4, this way it only shows three. Is that possible? I tried changing the values in the code but the only thing it does is messing up the animation

  3. 10 minutes ago, Cassie said:

    Hey Nicoletta - it works perfectly for more cards - it's just using a forEach loop!

     

    Example below with more cards added, maybe you weren't styling them?
     

     

     

     

    Hey @Cassie, thanks for the prompt response! What I mean is that by adding more cards you 'lose' the opportunity to display them as you're only displaying the first three. Is there a workaround for that?

×
×
  • Create New...