#javascript-code-16-notetype.js / js
// Find the first element in the <body> var cur = document.body.firstChild; while ( cur != null ) { // If an element was found, add the header class to it if ( cur.nodeType == 1 ) { cur.className += “ header”; cur = null; // Otherwise, continue navigating through the child nodes } else { cur = cur.nextSibling; } }
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.