topical media & game development
#javascript-code-18-classname.js / js
// Find all the <div> elements in the document
var div = document.getElementsByTagName(“div”);
for ( var i = 0; i < div.length; i++ ) {
// Find all the <div> elements that have a single class of ‘special’
if ( div[i].className == “special” ) {
// And hide them
div[i].style.display = ‘none’;
}
}
(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.