Just a heads up.
Caching functions of the DOM is a very bad idea as it depends on the browser implementation, so portability is low.
What must be cached is DOM data objects:
function IterateWorkOverCollection() { var target = document.getElementById("target"); var length = myCollection.getItemCount(); for(var index = 0; index<length; index++) { target.appendChild(myCollection[index]); } }
I wonder also about the performance of nextSibling instead of accessing to an element by index.
Olivier Mengu
Caching functions of the DOM is a very bad idea as it depends on the browser implementation, so portability is low.
Very true, "caching" the DOM objects rather then the Objects methods is also a modular approach. If you wanted to use multiple methods/properties of the DOM object, they are a single method/property away. Caching a method limits you to just the use of that single reference.
Sometimes those characters are a result of the fact that my host keeps feeding files out as iso-8859 where they should be UTF-8 (which will be fixed when I roll out a new backend).
I didn't escape one of the characters which hopefully explains some rendering issues.