Header
From Boxtheweb
(Difference between revisions)
(2 intermediate revisions not shown) | |||
Line 51: | Line 51: | ||
function allowJSlinks() { | function allowJSlinks() { | ||
var links = document.getElementsByClassName('jslink','span'); | var links = document.getElementsByClassName('jslink','span'); | ||
- | for(i=0; i<links.length; i++) | + | var title; |
- | links[i].innerHTML = '<a href="'+links[i].innerHTML+'">'+ | + | for(i=0; i<links.length; i++) { |
+ | title = links[i].title; | ||
+ | links[i].innerHTML = '<a href="'+links[i].innerHTML+'">'+title+'<\\/a>'; | ||
+ | }//end for | ||
}//end function allowJSlinks | }//end function allowJSlinks | ||
addLoadEvent(allowJSlinks); | addLoadEvent(allowJSlinks); | ||
//]]> | //]]> | ||
</script> | </script> |
Current revision as of 07:04, 20 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'); var title; for(i=0; i<links.length; i++) { title = links[i].title; links[i].innerHTML = '<a href="'+links[i].innerHTML+'">'+title+'<\\/a>'; }//end for }//end function allowJSlinks addLoadEvent(allowJSlinks); //]]> </script>