Jump to content
Search Community

Need to know if I'm using jquery.gsap plugin

jimeast test
Moderator Tag

Go to solution Solved by GreenSock,

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

  • Solution

A few options come to mind:

  1. Add a property that only GSAP can do, like "rotation" or "x" or "y". If it works, you know it ain't jQuery doing it ;)
  2. After you create a tween for a particular element, you could use TweenLite.getTweensOf("#yourElement") and see if it returns anything (well, see if the array is empty). That returns all of the registered tweens for that element that haven't been garbage collected. Again, if you get results, you know GSAP is working. 
  3. Along the same lines, you could try calling TweenLite.killTweensOf("#yourElement") while your stuff is tweening. If it stops animating, you know GSAP is doing the animations. If jQuery is controlling it, then killing tweens through TweenLite won't have any effect. 

In your demo, I added an "x:2000" to the tween and it worked fine, so there's your proof :) 

  • Like 2
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...