Share Posted August 12, 2014 So, I'm trying to build a slideshow that uses GSAP. But I'm wondering... do I do EVERYTHING with GSAP? One thing I'm trying to use right now is jQuery's addClass. The class I'm adding basically makes something visible. Can I continue to use that to show my slide? Or do I need to use GSAP to get the performance boost? Link to post Share on other sites
Share Posted August 12, 2014 Hi, I think the answer to the question is different for every case. It depends on the type of animation, what browsers you need to support, does saving few extra kilobytes worth dropping GSAP etc. In my workflow I use jQuery for selection engine, to add/remove events and to modify the DOM. For all my animations I use GSAP. Basically adding and removing a class can simply show/hide things, and if you set transition in the CSS, in modern browsers it will be animated. But it will look ugly on old browsers, and also you don't have so much control over what's happening for more advanced animations. Note that you will get the GSAP performance boost only if you actually animate things with jQuery animate() method and include GSAP and jquery.gsap.js plugin, or use TweenMax/Lite instead of jQuery animate. 3 Link to post Share on other sites