Jump to content


Draggable included in TweenMax

Go to solution Solved by Carl,

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

In the docs (https://greensock.com/docs/#/HTML5/GSAP/Utils/Draggable/) I notice it says that to use Draggable, all you need is TweenMax. "REQUIREMENTS: TweenLite and CSSPlugin or just TweenMax which contains both."


However, at the top of TweenMax.js (v 1.19.1) it says "Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin" and there is no mention of 'Draggable' anywhere within the file.


The CSSplugin.js file also seems to contain no mention to 'Draggable'.


I am having to include the Draggable utility separately in order to use it.


Is this an error in the documentation, or am I missing something?

Link to comment
Share on other sites

Draggable is a separate script, and needs TweenLite and the CSSPlugin in order to run. Much like a jQuery plugin needs jQuery to run. Use this script tag and you should be good to go. It's from JSDelivr.

<script src="https://cdn.jsdelivr.net/g/gsap@1.19.1(TweenMax.min.js+utils/Draggable.min.js)"></script>

See the Pen 2725b9bebf3b4b16dd62c5d5592eeedc by osublake (@osublake) on CodePen


  • Like 4
Link to comment
Share on other sites

  • Solution

Sorry, for the confusion. The requirements detail what you need in addition to the tool you are reading about in the docs. To say that "Draggable requires Draggable" or "TweenLite requires TweenLite" would read a little odd to us. 

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