Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

MarcOlmos's Achievements

  1. I've found the solution, thank you!!! // wait until DOM is ready document.addEventListener("DOMContentLoaded", function(event) { console.log("DOM loaded"); // wait until images, links, fonts, stylesheets, and js is loaded window.addEventListener("load", function(e) { // custom GSAP code goes here console.log("window loaded"); gsap.registerPlugin(ScrollTrigger); document.getElementById("button").addEventListener("click", function(){ const notifyTL = new TimelineLite({paused: true}) notifyTL.to(".notifyjs-corner", {y: +70}) var prevScrollpos = window.pageYOffset; window.onscroll = function() { var currentScrollPos = window.pageYOffset; console.log(currentScrollPos); if (currentScrollPos > 218) { notifyTL.reverse(); } else { notifyTL.play(); } } }); }, false); });
  2. Hi, I've been having problems with an element that appears when a button is clicked. When I scroll more than X px my navbar height changes, and I would like to do the same with the element to animate. But GSAP doesn't find the target. How can I make GSAP wait to search for the animation until I click the button of "Adding to the cart"?? Thats my code. Thanks!!!
  3. Hi, I would like to create this cool navbar animation. The navbar desappear once you scroll down, but it appears again when you scroll up a little bit. https://caprocat.com/ Thanks for you help.
  4. Thank you!! It was that!!
  5. This is how I enqueued GSAP and ScrollTrigger, the problem could be there. I will be waiting for some help. Thank you!
  6. Hi, I was trying to created some cool animations using ScrollTrigger, but it doesn't work. The animation plays once the page is loaded. This is my code: I would like to add that thanks to the activity of this forum I could integrate GSAP animations to a child theme on Wordpress.
  7. Is there any option in order to scroll to the left or to the right and make changes with ScrollTriggers? I have been trying to do it, but gsap only detects vertical scrolling, not horizontal scrolling. I'm trying to do something like that https://robin-noguier.com The effect that I want it is only seen in mobile responsive. Thanks.