Share Posted November 5, 2015 Another noobie question: I have been following the tutorials in the Noble Desktop book for learning GSAP. JQUery is used as an id and class selector (and for some UI functionality in some tutorials). However, I wonder if this is still relevant, since loading TimelineMax, and TweenMax seems to already give the ability to select any elements based on id and class without the need for jQuery. My question is, is there any benefit to loading JQuery just to select elements within the context of banners? Can I safely dispense with JQuery then? Link to comment Share on other sites More sharing options...
Share Posted November 5, 2015 Nope, you don't need jQuery these days unless you're using some really advanced selectors. GSAP will tap into the standard document.querySelectorAll() method that's baked into ALL modern browsers. So unless you're targeting IE8 or earlier (or are doing super advanced selectors which is doubtful), you can safely omit jQuery. Oh, and jQuery has other methods for doing things like AJAX-ing (loading) content. But again, you're probably not using that for a banner. Good question. Happy tweening! 1 Link to comment Share on other sites More sharing options...
Author Share Posted November 5, 2015 What about for interactivity. Would JQuery be useful for mouse over effects, or can GSAP handle this as well? 1 Link to comment Share on other sites More sharing options...
Share Posted November 5, 2015 You will be using normal (vanilla) JavaScript for interactivity. There is a bunch of things you can achieve without really needing jQuery. As OSUblake pointed out a couple of times, you might want to refer to the bellow link for some handy snippets: www.youmightnotneedjquery.com 2 Link to comment Share on other sites More sharing options...
Share Posted November 6, 2015 Yes indeed, I forgot to mention the mouse handling that jQuery can do for you, but as Dipscom pointed out, that can be done pretty easily with vanilla JavaScript or a much smaller, more specialized library that only focuses on mouse/touch interaction. For the record, I'm not opposed to using jQuery at all. It's a great tool. And if it's cached, it costs virtually nothing to load. But if you don't really need it, great - dump it. 1 Link to comment Share on other sites More sharing options...
Author Share Posted November 6, 2015 thanks for the insight guys Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now