Jump to content
Search Community

Search the Community

Showing results for tags 'getelementbyid'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hello All, My question has to do when using the tween target. I know as far as speed that targeting elements in the DOM by ID is faster than targeting a class. I know to use document.getElementByID() when i need to target a ID. But when it comes to other selectors ( like classes, attribute selectors, etc... ) GSAP knows to add the jQuery $() if jQuery is included in the page. So my question is... What is faster... to omit the $(), or include it: ?? // jQuery is loaded in the page // Which is faster ? // without the $ TweenMax.to(".myClass", 2, { color:"#FC0"}); // with the $ TweenMax.to($(".myClass"), 2, { color:"#FC0"}); If I include the $() does it help with speed or performance, since im including the $() or does it not even matter? Thanks in advance for any help with my questions
×
×
  • Create New...