3 ms·
I did not know this before, very interesting. Despite the easy access as a global variable, using document.getElementById() turns out to still be faster - http
by josephscott 12y ago
I did not know this before, very interesting.
Despite the easy access as a global variable, using document.getElementById() turns out to still be faster - http://jsperf.com/id-vs-class-vs-tag-selectors/328 http://jsperf.com/id-vs-class-vs-tag-selectors/328