Jump to content
Search Community

lgehrig4

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

lgehrig4's Achievements

2

Reputation

  1. Thanks guys! Yes, I should get to know bracket notation, as well as many other things to be honest. I've only been coding for 9 months (teaching myself) and I had 0 technical background prior (finance guy).
  2. I wasn't able to add the SplitText plugin so I'm not sure if this helps https://codepen.io/lgehrig4/pen/vYYZwMb
  3. I'm creating a SplitText reference using a dropdown to choose properties and a button to start the animation with the chosen properties. With the properties hard coded everything works, but I can't figure out how to dynamically add them. I've tried using back ticks (`${property}` and just the variable name. I logged property and it's correctly grabbing values (chars, words and lines) const property = document.querySelector('select').value const tl = new TimelineLite mySplitText = new SplitText(".splittext", {type: "words, lines, chars"}) chars = mySplitText.chars lines = mySplitText.lines words = mySplitText.words tl.staggerFrom(property, 1, {opacity:0, y:80, ease: Elastic.easeOut}, 0.4) document.getElementById("animate").onclick = function() { tl.restart(); }
  4. Worked perfectly! Thanks for the answer and the additional context. Still have got a lot to learn
  5. I guess this applies to any of the plugins. I'm fairly new to coding and only recently learned about GSAP. I signed up for the Shockingly Green plan and downloaded the file with the plugins. I've followed a few tutorials and have used CDNs only up to this point. All the splittext tutorials I've found are done on CodePen. How do I set this up? I inserted the SplitText.js file into my project file and use an HTML script tag, but get this message in the console referring to line 15 of this file: Uncaught SyntaxError: Cannot use import statement outside a module Sorry for the newbie question, but all the lessons/documents skip this part and go straight 'how to use it' after it's installed
×
×
  • Create New...