Jump to content
Search Community

Leptitnouveau

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Leptitnouveau

  1. Hello, I'm trying to create a portfolio with GSAP, but I am having some troubles here. It says that the end property of mytimeline.scrollTrigger is undefined. I suppose that it is because there's a problem with the end marker Thanks in advance I am not sure but maybe this screenshot can help (When I do not use the offsetHeight of my trigger element the end marker never reach the scroller-end marker):
  2. Yes of course: https://codepen.io/Leptitnouveau/pen/OJaJLYW I have discover this method on w3school It is the line 202. When the screen is under 1000px I take every images from my content and put it to a div that will become the right page when the screen width is over 1000px. Alright, now I get it thanks a lot! By the way, this is a work for school. Are you ok with the fact that I mention you in my credit page for the function that you gave me?
  3. Hello, Thanks for the answer I did not know about the data thing, I tried to create a function to not have multiple Event Listener but I couldn't pass the label as a parameter (Probably my mistake). When you mean cleaning the Event Listener, it means removing the listener? And is it possible that gsap.matchMedia create conflicts with window.matchMedia if I use it too on my JavaScript? Because I tried and a part of the animation keep working under a width of 1000px ?
  4. Hello, So I have this weird console problem, if you click on a link from the header it will lead you to the corresponding section. But if you reduce the width of the screen until it is the tablet version (under 1000px) and then go back to the PC version. The function will still work, but this error will appear. I thought it was because I activated ScrollTrigger when the screen size is under 1000px so I used this: https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.matchMedia() but the error still appear... If anyone has an idea why please let me know. Thank you in advance ?
  5. Okay, it took me a while but I think that I've fully understood the process. This forum is really amazing! Thanks a lot ?
  6. Hi, First I would like to apologize if I made some grammatical mistakes or else (I am still learning English) I did not really understand how does the function getScrollPosition (https://greensock.com/docs/v3/HelperFunctions#getScrollPosition) work. I would have liked to know the Position of an animation that way I can use it as an anchor for my links at the beginning of the page. For example when we click on the first link "Prologue", it leads us to the moment when we see "Prologue" in the left part of the book (In my JavaScript, it is the equivalent of the moment when "tl.from(".prologue", {yPercent:100, opacity: 0});" ends). Is it possible? Thank you in advance and have a great day!
×
×
  • Create New...