Jump to content
Search Community

Miguel Espinosa

Premium
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Miguel Espinosa

  1. Hello good day,

     

    I have an issue within scrollTrigger and scrollSmoother. Sometimes my website loads all animations correctly, other times incompletely.

    I think it has to do with the fact that scrollTrigger has already finished doing its calculations but the page hasn't finished loading all its elements yet. The reason is that if I scale the browser window, it fixes

     

    Is there a way to update or refresh scrollTrigger or scrollSmoother? For example, refresh when some DIV enters the viewport or when all elements finish loading?

     

    I tried adding ScrollTrigger.refresh() like this code below, but I am not sure how to implement it

     

    gsap.to('.amenidadSectionColBottom', {
          opacity: 1,
          ease: 'none',
          scrollTrigger: {
            trigger: '#amenidadSection',
            start: '30% 80%',
            end: '50% 70%',
            scrub: true,
        onEnter: () => ScrollTrigger.refresh(),
          }
        });

     


    Thanks in advanced for your help

  2. Hello, good morning

     

    I am creating a website in Wordpress, where I have installed ScrollSmoother which is fantastic.

     

    The problem I am finding is that when using a carousel and clicking the buttons to display the content, the scroll jumps to the top of the page (not the content in the first place) and when I scroll down again to continue browsing, the content jumps towards the top of the page. That is, the scroll loses its original position after clicking the button.

     

    I tried putting a "#/" to the href to prevent the scroll from scrolling after the clicking the button, but this didn't work.

     

    Also, I can't make a demo because it's a Wordpress installation, but if it helps I can add the link where it's hosted at the moment:

    https://adcorp.mx/basavi/

     

    Any help will be greatly appreciated. Thank you in advanced.

×
×
  • Create New...