Jump to content


Is jQuery ever necessary for ad display banners?

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

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

  • Solution

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!

  • Like 1
Link to comment
Share on other sites

What about for interactivity. Would JQuery be useful for mouse over effects, or can GSAP handle this as well?

  • Like 1
Link to comment
Share on other sites

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:



  • Like 2
Link to comment
Share on other sites

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. 

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