Jump to content
Search Community

superpositif

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by superpositif

  1. OSUblake Thank you very much ! :)  It's very interesting to do everything in reverse.

    I tried but finally I need the animation to be scroll controlled. So I added scrub:1 (did it right?)
    The result is not bad, however the image does not remain fixed at the bottom of the screen. What do you think ?

     

  2. Thanks @akapowl, thanks @iDad5 , thank you for your relevant feedback

     

    I have modify my CSS and now I kill the smoothscroll.

     

    Now

    from wide window to small window = the horizontal scroll turn into a vertical scroll. Cool :)

    from small window to wide window = I have an error in the console : 

    ScrollTrigger.min.js:10 Uncaught TypeError: Cannot read property 'scrollWidth' of null
        at kb (ScrollTrigger.min.js:10)

     

    my codepen is updated : 

  3. Hi,

     

    I try to use an horizontal scroll. I use smooth-scrollbar.js and gsap/scrollTrigger. It's very cool. 

    I would like the horizontal scroll only for min-width > 1024px, and vertical scroll for max-width = 1024px

    And i would like to switch horizontal<=>vertical on resize.

     

    I use window.matchMedia 

    But that doesn't work on resize.

    from small window to wide window = the vertical scroll turns into a horizontal scroll.

    from wide window to small window = the horizontal scroll does not turn into a vertical scroll.

     

    I try to kill the scrollTrigger but not not sure that it is really essential.

     

     

    How can I switch horizontal to vertical and vertical to horizontal, on resize, please ?

     

    See the Pen gOgajmx by superpositif (@superpositif) on CodePen

×
×
  • Create New...