Does Draggable have any dependencies?
The only dependency is on GreenSock's core. There are no dependencies on jQuery or any other libraries, although they work great together.
The only dependency is on GreenSock's core. There are no dependencies on jQuery or any other libraries, although they work great together.
Yes, Draggable is just for DOM elements. But the real magic behind all the fluid motion and snapping is InertiaPlugin, and that can be used to tween any property of any object, not just DOM elements. So yes, you can absolutely get this kind of motion in other contexts but you'd need to wire up the actual dragging logic yourself and then fire off an InertiaPlugin tween when the user releases their mouse/touch. InertiaPlugin can even track the velocity of any property for you too (even function-based getters/setters!), so it's quite a powerful tool.
Pretty much every major browser is supported including Chrome, Firefox, Opera, iOS, Android and IE even back to version 9! We're not aware of any significant browsers that don't work, but please let us know if you stumble across an issue.
requestAnimationFrame
(when available) for maximum efficiency. See for yourself in Chrome Dev Tools - you should see very snappy performance in the timeline. Many other tools like jQuery UI use top/left properties for positioning which don't generally perform as well. These tools have been fully "GreenSocked" so performance is smoking fast, just like the core tweening engine.
IntertiaPlugin is a membership benefit of Club GreenSock, so you need to sign up to get that. Draggable, however, is included in all the standard downloads and you don't need a membership to get that; Draggable can be used apart from InertiaPlugin as long as you don't need the momentum-based motion. GreenSock's standard license allows you to use GreenSock tools for free in everything except a very specific type of commercial project (if you collect a fee from multiple customers for the app/product/game/site that uses GreenSock tools) which makes it extremely accessible and business-friendly while providing a small funding mechanism to sustain ongoing support, enhancement, and innovation. The web is littered with abandoned “open source” projects, but GreenSock has a years-long track record of commitment to the platform. This unique licensing model is a key component of its sustainability. If you charge multiple customers a usage/access/license fee, please simply sign up for a “Business Green” Club GreenSock membership which comes with a special commercial license granting you permission to do so. Click here for details. Joining the club also gets you members-only bonus plugins, utilities, update notifications, and more.