javascript DOM manipulation
DOM access is expensive; it’s the most common bottleneck when it comes to JavaScript performance. The bottom line is that DOM access should be reduced to minimum. This means: Avoiding DOM access in loops Assigning DOM references to local variables and working with the locals Using selectors API where available Caching the length when iterating ... Read more