logo
Course

Targeting Elements

Before you can animate anything, you need to know what you're animating. That’s where targeting comes in. In GSAP, the target is the first thing you pass to any animation method, like gsap.to() or gsap.from(). It tells GSAP which element(s) to animate. Knowing how to target elements is important because there are different ways to do it, and each one works best in different situations. ### Targeting by Class Name

The rest of this lesson is waiting.
Join JS Mastery Pro to unlock it.

Web Animations Full Course | Build a GTA VI Website & Master GSAP

Web Animations Full Course | Build a GTA VI Website & Master GSAP

$599

Buy the Course Only
  • Lifetime access to this course

  • Build advanced web app

  • Certificate of completion included

  • Great for focused learners who just want this course

  • gsap
    javascript
    nextjs
    react native
    threejs

    Get Full Access

    $149 /month

    Lock in a year & save—2 months free!

  • Access to all courses

  • Quizzes, mini-challenges, AI summaries, inline sandboxes

  • Participation in a private community

  • Build real production-grade apps

  • Mock interviews & project reviews

  • Weekly live sessions & member-only access