topical media & game development
#javascript-css-comment-script.js / js
/* Original script by Corneliu Lucian Rusu | http://www.anet.ro/zen/
Portions modified by Lee Underwood | http://javascript.internet.com/ */
function showhide(s){
while(s.nodeType!=1 && s.nodeName.toLowerCase()!='span'){s=s.nextSibling};
s.className=(s.className=='show2')?'hide':'show2';
return false;
}
// Borrowed from Jeremy Keith | http://www.domscripting.com/
window.onload=getReady;
function getReady() {
var links = document.getElementsByTagName("a");
for (var i=0; i<links.length; i++) {
if (links[i].className == "show") {
links[i].onclick = function() {
return showhide(this.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.