Jump to content
Search Community

Magiecodes

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Magiecodes

  1. @elegantseagulls Thank you for your suggestion! My code above actually works in a local environment, so that part doesn't seem to be the issue. I think the issue is with trying to incorporate gsap with dojo.js and not having the proper configuration.
  2. Sigh, this is what I've feared. I really appreciate you going through the effort to help. Thank you so much!
  3. I am currently working to integrate gsap into a project. which is a static landing page. I am using a CMS with dojo.js being used (don't even get me started...it is super deprecated) Currently I am just using two CDN scripts <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/ScrollTrigger.min.js "></script> which are both being loaded at the bottom of my html, but before my script tag I can get the gsap to load using window.addEventListener('load', function() { gsap.from(".date-image", { y: 100, duration: 1, }) }) the ".date-image" animates as expected. However, if I attempt to register the scrollTrigger plugin it doesn't recognize it. gsap.registerPlugin(ScrollTrigger) console.log("ScrollTrigger:", ScrollTrigger) window.addEventListener('load', function() { gsap.from(".date-image", { y: 100, duration: 1, scrollTrigger: { trigger: ".date-image", start: "top 60%", end: "top 30%", markers: true, scrub: 2, toggleActions: "restart none none none", } }) }) Console: Invalid property scrollTrigger set to {trigger: '.date-image', start: 'top 60%', end: 'top 30%', markers: {…}, scrub: 2, …} Missing plugin? gsap.registerPlugin() I have tried to load the "gsap.registerPlugin(ScrollTrigger) it at different times, to no avail, and I was hoping that someone might mention how they have loaded the plugin or where they have loaded it? I know that it is preferred that I show a working demo in these forums, however, using a CMS, it's not possible. I'm relatively new in web development and unfortunately the people I work with don't like to help new people, but grateful for resources to try to get some help elsewhere. *Also want to note that the scrollTrigger animation does work as expected if I recreate in Codepen
  4. Thank you! It's always the silly stuff! However, I'm still getting the same error. I must be missing something else too?
  5. Trying to do some basic ScrollTrigger animation. I keep running into the issue of the plugin not being recognized and was hoping to get some insight on this bug. The error that pops up in my console is: Invalid property ScrollTrigger set to .square Missing plugin? gsap.registerPlugin() I am declaring the plugin: gsap.registerPlugin(ScrollTrigger); I also have all of the necessary CDN links (at least I think so) <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollTrigger/1.0.5/ScrollTrigger.min.js"></script> <script src="app.js"></script> The animation begins once the page loads but can't figure out why the ScrollTrigger isn't working. Attached is the codepen which is super basic and scaled down to recreate the error I'm having. Thank you!!
×
×
  • Create New...