Header
From Boxtheweb
(Difference between revisions)
| Line 50: | Line 50: | ||
}//end function addLoadEvent | }//end function addLoadEvent | ||
function allowJSlinks() { | function allowJSlinks() { | ||
| - | |||
var links = document.getElementsByClassName('jslink','span'); | var links = document.getElementsByClassName('jslink','span'); | ||
for(i=0; i<links.length; i++) | for(i=0; i<links.length; i++) | ||
| - | links.innerHTML = '<a href="'+links.innerHTML+'">'+links.title+'<\\/a>'; | + | links[i].innerHTML = '<a href="'+links[i].innerHTML+'">'+links[i].title+'<\\/a>'; |
}//end function allowJSlinks | }//end function allowJSlinks | ||
addLoadEvent(allowJSlinks); | addLoadEvent(allowJSlinks); | ||
//]]> | //]]> | ||
</script> | </script> | ||
Revision as of 13:45, 19 April 2006
<style type="text/css">
/*
Notes:
-You must log as admin to edit this page
-Whatever you enter in this page will be added to the html in the header after the standard style sheet, so you can override styles.
-if you want your code to look nice on this page, put a space at the beginning of each line
-This is the default style sheet that you can override : http://editthis.info/wiki/skins/monobook/main.css
For example uncomment this next section to turn all the text green:
*/
/*
body {
color: green;
}
*/
</style>
<script type="text/javascript">
//<![CDATA[
if( document.all && !document.getElementsByTagName )
document.getElementsByTagName = function( nodeName )
{
if( nodeName == '*' ) return document.all;
var result = [], rightName = new RegExp( nodeName, 'i' ), i;
for( i=0; i<document.all.length; i++ )
if( rightName.test( document.all[i].nodeName ) )
result.push( document.all[i] );
return result;
};
document.getElementsByClassName = function( className, nodeName )
{
var result = [], tag = nodeName||'*', node, seek, i;
var rightClass = new RegExp( '(^| )'+ className +'( |$)' );
seek = document.getElementsByTagName( tag );
for( i=0; i<seek.length; i++ )
if( rightClass.test( (node = seek[i]).className ) )
result.push( seek[i] );
return result;
};
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}//end if
}//end function addLoadEvent
function allowJSlinks() {
var links = document.getElementsByClassName('jslink','span');
for(i=0; i<links.length; i++)
links[i].innerHTML = '<a href="'+links[i].innerHTML+'">'+links[i].title+'<\\/a>';
}//end function allowJSlinks
addLoadEvent(allowJSlinks);
//]]>
</script>
