Jump to content
Search Community

pietM

Premium
  • Posts

    93
  • Joined

  • Last visited

Posts posted by pietM

  1. Thanks for taking the time, @Rodrigo!

    This is very helpful and appreciated. I know about Draggable's built-in boosting, but was unclear about how to achieve this using the GSAP Observer.  This is what I needed:

     

    // Increase the z-index value and apply it to the target element
          zIndex++;
          gsap.set(item, { zIndex });

     

    Thank you!!

  2. Hi all! 

     

    I'm trying to run a timeline using gsap's toArray and random utilities. In the attached demo, I have a simple sequence that I would like to randomize and re-randomize on repeat. 

     

    2,5,7,8,9....etc. 

    repeat 

    3,8,7,1,2...etc.

     

    I've reviewed the documentation and haven't been able to figure out how to implement gsap's random or shuffle utility to achieve this. 

    As always, I appreciate any and all guidance. 

     

    See the Pen b6ec32105578a360dc4c47bc3809e2f5 by evryali (@evryali) on CodePen

  3. Hi Everyone! 

     

    I have a timeline that plays and reverses based on scroll direction. I also use a mouse enter/leave function to trigger/control the same timeline. When using ScrollSmoother the direction overrides the mouse enter/leave functions (the timeline won't play until the scroll is at rest, even when I trigger mouse enter/leave events).

    My question: Can I overwrite the scroll control to prioritize the "mouse enter/leave" functions? 

     

    Thanks, as always. 

     

    See the Pen abKQPmO by evryali (@evryali) on CodePen

  4. Thanks, Jack! 

     

    Okay, I have the splits sequenced (I think I was overthinking it), but now I'm trying to reset the heights to "0" after the master completes with an onComplete function. But it's not working. Have a look.

     

    See the Pen bGvRwyY by evryali (@evryali) on CodePen

     

    Thank you! 

     

     

  5. Thanks for getting back! 

     

    In the example, there are three discrete splitText animations sequenced by a master timeline.

     

    timeline 1: 1/3 

    timeline 2: 2/3

    timeline 3: 3/3

     

    2/3 replaces 1/3.

    3/3 replaces 2/3.

    Then the whole timeline repeats.

     

    Rather than fading each animation out, I'd like to stack them:

    So, after 1/3 completes, the text block gets pushed up to make room for 2/3 and so on. 

     

    Does that make sense??

  6. HI everyone,  

     

    Likely a common question, but I can't find a clear solution after searching the forums.

    I have elements in a div that distribute by flex after a "mouseenter" event. The widths are set to "auto," so they shift once the browser dimensions change. 

    I think I need to add a "resize" listener:

     

    window.addEventListener("resize", () => {})

    and collect the new widths with gsap.getPropoerty() after "resize" and tl.kill()?

    But when I try this approach it doesn't work. 

     

    Appreciate the help and feedback. 
    M

     

    See the Pen LYeYWXm by evryali (@evryali) on CodePen

  7. Thanks for taking a look @warkentien2

    I really appreciate. 

     

    The container can remain at 100vw, but I want individual slides to have "auto" widths. Because each slide is set with an "absolute" position, I can't get the flex to distribute the slides without compromises to the slider functionality.

     

    Does that make sense?  

     

    Here's a non-GSAP example for reference. 

     

    See the Pen 0b47c43127aebcc42a7cd6a674a93882 by evryali (@evryali) on CodePen

     

    Basically, I want to keep all of the functions in the GSAP slider in the first post, but apply it to a container with images of varying widths. 

  8. Thank you @Cassie !!

     

    Unfortunately, I had to resort to the Intersection Observer API for the desired effect. Here's the code and updated pen, should anyone want to use it:

     

    const captiongrab = new window.IntersectionObserver(([entry]) => {
      if (entry.isIntersecting) {
        caption2.innerHTML = captioner.innerHTML;	
      }}, {
      root: null,
      threshold: 0.1
    })
    
    captiongrab.observe(box);

     

     

    -

     

    My next question is how to calculate the width of the slide container with slides of varying widths.

    Where can I reach out for paid assistance with this?

     

    Thanks for all!  

×
×
  • Create New...