Jump to content
Search Community

Does jQuery :animated scope GSAP Tweening?

soupking test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hm, I don't quite understand the question. @soupking are you asking if GSAP adds some sort of pseudo class to all the elements it animates? No. But you can use the getTweensOf() method and set the "onlyActive" parameter to true. Is that what you're looking for? Maybe it'd help if you explained the "why" behind your question and we could toss some suggestions your way. 

  • Like 2
Link to comment
Share on other sites

Well, I'm exploring jQuery and what it provides. ':animated' is a selector extension (to see if animating) of their API and was wondering if that would effect GSAP animations from a DOM manipulation approach.

 

You make a good point though, why not just suspend an animation within it's own library vocab. I don't have a specific scenario. Considering that jQuery and GSAP are both CSS selectors for the most part (right?) it's probably akin to me asking whether I should go left or right to get to the same result.

 

Mostly curious is all I suppose. Thanks for responding. :-D

Link to comment
Share on other sites

Ah, okay. Well, I certainly wouldn't call GSAP a "CSS selector" by any stretch. It simply taps into document.querySelectorAll() by default, or jQuery if it's loaded (not necessary). GSAP is solely focused on solving animation problems - it's not really meant to do super advanced selections in the DOM or anything (beyond querySelectorAll() which is typically all you need). I suspect you can do pretty much anything you want animation-wise directly with GSAP. jQuery isn't really focused on animation (though it does some basic stuff...albeit much, much slower). 

 

Anyway, let us know if you need anything else GSAP-wise. Happy tweening!

  • Like 2
Link to comment
Share on other sites

Cool, good to know. Most of what I work with in libraries is pre-compiled so it's hard to tell at what point objects are affected (even if I were that smart to diagnose it).

 

I'll try to make that delineation when structuring code. Thanks, Jack!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...