ScrollTrigger From To / changing pages

I made an animation when scrolling from one section to another, the opacity is changed to 1 ( and reverse when scrolling back).
Method used: “to” (“from to” had the same effect/didnt solve the problem).

Similar to this principle

If you stay on the same page everything is fine.
But if i use the header menu, things get broken.


The header menu consits of

  • Link to another page (url/blog)
  • Anchor links to sections in a onepage design (for instance url/#about url/#pricing and so on).

Problem description steps:

  1. Entering the homepage which consits of a onepage design. The first 2 sections are animated as stated above.
  2. Using header menu to chage to another page outside the onepage, for instance url/blog
  3. Using header menu to change back to the main homepage (onepage), where the scrolltrigger is set. But not to the top, but to an anchor link to jump straight into a section. For instance url/#about. This section is below the section where the trigger is set.

=> What happens now is, that the jump into this section below seems to count as a scroll. So the opacity was set to 0.
But the problem is now when scrolling back up, it stays at 0. Which has the effect that the content isnt shown anymore on that page.

@Daniele Maybe any update on this? Can you confirm this as a bug or is it an configuration error?