id vs class selection benchmark

Posted by zaf on Stack Overflow See other posts from Stack Overflow or by zaf
Published on 2010-04-01T11:14:21Z Indexed on 2010/04/01 11:23 UTC
Read the original article Hit count: 279

Filed under:
|
|
|
|

Has anybody bench marked selecting elements with id's and class's from CSS and javascript?

It would make sense that an element with an id is faster to select than if it had a class even if it was the only element with that class.

Do I really need to be concerned?

© Stack Overflow or respective owner

Related posts about css

Related posts about JavaScript