I've seen many examples(including favorite Twitter's bootstrap) where various APIs make use of $("[data-something]") rather than selecting by class $(".something")
Nethertheless I tried to find information about performance between these two different selectors. I was surprised that many performance test did find out that those selectors are equally fast on most of the modern browsers so I decided to do my own test
I'm really confused right now and I don't know if it's my test that are done wrong(somehow?) or is it other tests that I inspected before?
Could anybody provide more information if I'm doing something wrong while testing or are these test correct and data-attribute selector IS in fact pretty much slower than regular class selector?
Thank you