Jump to content
Search Community

PaulGodard

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by PaulGodard

  1. Thank you again.  That is what I changed as indicated in the update of my original post.  So the html file looks like this but it's still does not work.

      <script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js'></script>
      <script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/ScrollTrigger.min.js'></script>
      <script src = "js/main.js" defer></script>

    Looking at the demos, I used the following links and it works.

      <script src='https://unpkg.co/gsap@3/dist/gsap.min.js'></script>
      <script src='https://unpkg.com/gsap@3/dist/ScrollTrigger.min.js'></script>
      <script src = "js/main.js" defer></script>

    Weird isnt'it?

  2. Hi.  I am totally new to GS. I am watching the ihatetomatoes GS101 – 01 – ScrollTrigger Basics and I get the following error writing the exact same code as in the video.

    gsap.registerPlugin(ScrollTrigger);
    
    
    function init(){
        gsap.to('#intro img', { opacity: 0, scrollTrigger: { trigger: '#intro', start: 'top top', scrub: true, markers: true } })
    }
    
    window.addEventListener('load', function(){
        init();
    });

    after loading the js in the html file

      <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollTrigger/1.0.5/ScrollTrigger.min.js"></script>
      <script src="js/main.js" defer></script>

    Invalid property scrollTrigger set to

    Object { trigger: "#intro", start: "top top", scrub: true, markers: true }

    Missing plugin? gsap.registerPlugin()

     

    I google the error but can not find what is the problem... most probably a stupid little thing...

    Any idea?

     

    update... I found that the version of gsap and scrolltrigger could be incompatrible so I change the html file but now nothing is changing when scrolling.

    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.0/gsap.js">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.0/ScrollTrigger.js"> 

     

×
×
  • Create New...