I’ve been working with some javascript lately and wanted to see if it made a difference if I was changing the class or inline style of an element. I had heard that changing classes was faster, but can it really make a big difference?
I coded up a quick example. Here are the results in ms(all on osx):
I really didn’t expect those kinds of results. Kind of amazing!