I just ran this jsPerf test in Chrome 18 and found that .class
performs significantly better than tag.class
despite the myriad of resources that say otherwise. I know this questions was recently asked on SO but without a definitive / satisfactory answer other than "don't use jQuery". Can someone shed some light on the latest best practices?
NOTE: Assume clarity and semantics are taken care of (e.g. I have a class on an anchor tag called item-link
it's going to come off just as clear with a.item-link
as it will .item-link
).