Jump to content

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


Popular Content

Showing content with the highest reputation on 06/22/2019 in all areas

  1. Actually, I don't know what you're giving it because you didn't post any code. A really simple test to see what you're giving it. console.log(typeof (loadContent(activeClass.getAttribute("value")))); What does that print out? My spidey-sense tells me it's going to say "undefined" instead of "function". Again, this has nothing to do with GSAP. It's how pretty much every programming language works. This calls loadContent immediately, and becomes whatever calling loadContent returns. If it returns nothing, it's undefined. loadContent(activeClass.getAttribute("value")) This is an anonymous function and will be called later. function() { loadContent(activeClass.getAttribute("value")) } To summarize, you're giving it the result of a function, and not the function itself.
    4 points
  2. You wanna be careful with those awesome posts @Shrug ¯\_(ツ)_/¯ or they'll make you a moderator. And once you're in you can never leave. No matter how far you run, you will wake up back in the forum.
    4 points
  3. I think this is a better demo. https://codepen.io/osublake/pen/veyxyQ
    2 points
  4. You're calling the loadContent function immediately that way. You're basically doing this. loadContent(activeClass.getAttribute("value")); t1.add(undefined); That's how JavaScript works. It has nothing to do with GSAP.
    2 points
  5. Interesting site. I'm a little shocked at the Republic of Samsung, which has the fastest the internet in the world. 12.52% ? I mistakenly thought Republic of Korea meant North Korea at first, but then I remembered they don't have internet over there. Look at all those problems Edge 76 fixes ?
    2 points
  6. I don't think that has anything to do with GSAP. When you hit 0 on the font-weight, it defaults to 400. You can only use numeric values of 1-1000. To see what I mean, try removing all tweens and just set the :root to a weight of 0 and see the difference. If you tween to a weight of 1, I think you'll see the desired results. https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight Happy tweening.
    1 point
  7. Pretty hard to know for sure what's wrong just from the description. However if your intention is to call the ajax content after the timeline is finished you probably should do it on an onComplete callback. https://greensock.com/docs/TweenMax/eventCallback or if you want call it inside the timeline at a specified point see https://greensock.com/docs/TimelineMax/add or https://greensock.com/docs/TimelineMax/call Note also the proper way to pass parameters in the docs so the function doesn't run immediately. I don't do much ajax but I can imagine one potential issue you may have doing this is the ajax loaded content may not be ready when the subsequent animation occurs so you may need to have a way to wait until it is all loaded.
    1 point