JavaScript optimization Part 3: Attaching events

Posted by Dmytro Shteflyuk on under JavaScript

This is a third part of the JavaScript optimization tutorial, and today I’m going to talk about events. Sorry for a long delay between posts, I hope remaining parts would not be delayed so much.

Scenario: you have some elements and you need to add some actions to them (for example, when user moves mouse cursor over element, or clicks on elements).

Read the rest of entry »

JavaScript optimization Part 1: Adding DOM elements to document

Posted by Dmytro Shteflyuk on under JavaScript

Most web-developers writing tons of JavaScript, especially in our Web 2.0 century. It’s powerful technology, but most browsers has very slow implementation of engine, and everyone at some instant decide to review code and make it faster. In this post I’ll share my experience and explain several tricks how to make your JavaScript as fast as possible.

This is first article in 7 parts tutorial, stay tuned.

Read the rest of entry »