Efficient JavaScript talk
Watch it @ the YUI Theater or download for Quicktime
5 lessons to retain from the talk:
- Don't modify visible objects: hide, modify, display.
- Best way to append multiple elements: remove node from DOM, append elements, re-attach element to DOM.
- Beware of the markup maintenance issues caused by the use of innerHTML.
- Avoid internal browser reflow (repositioning) by caching element properties.
- Rather than binding events to every element inside a container, bind only to the parent container. It is easy to access each of its children by id.
No comments:
Post a Comment