crbopp99 Posted March 7, 2021 Share Posted March 7, 2021 I am struggling so much with this, and some of it just the plain coding. I want text boxes that explain what kind of coffee each is to appear when the button is pressed. My current problems are that I can't get the box to stop in the center of the screen, and then I don't know how to get different text to show up depending on the button pressed. See the Pen xxRzJvx by crbopp (@crbopp) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted March 7, 2021 Share Posted March 7, 2021 Yeah - this is a logic and layout question rather than a GSAP query. We don't have the capacity to build projects for everyone but we're happy to help with any and all GSAP related problems. You need to look at getting the width of your window when you animate the position of that description paragraph. It'll also be more efficient to use a loop to add listeners and animations to each button. If you're just getting started with GSAP and JS in general, I recommend the GS learning section for starters. There are many resources for JavaScript training out there. Multiple YouTube channels, tutorials and docs are available for free along with some paid outlets. I'd start right here: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics I know it's frustrating in the beginning, but it'll start to make sense if you stick with it. You'll learn so much more by experimenting on your own rather than having someone else write the code for you. Start each project with small pieces and get them working the way you'd like and then add on as you go. We're always here for any GSAP related problems and questions you may have. Happy tweening. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now