Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:27:32 GMT
Global FooterThis script will allow you to change any image on your forum to have a rollover. <script type="text/javascript"> <!--
// Image rollover effect
function doRollOver(oldsrc, newsrc, title){ var img = { oldsrc: null, oldtitle: null }; var iImg = document.getElementsByTagName("img"); for(i = 0; i < iImg.length; i ++){ if(iImg.item(i).src.match(new RegExp(oldsrc))){ iImg.item(i).onmouseover = function(){ img.oldsrc = this.src; img.oldtitle = this.alt; this.src = newsrc; this.title = title; } iImg.item(i).onmouseout = function(){ this.src = img.oldsrc; this.title = img.oldtitle; } } } }
doRollOver("IMAGE TARGET", "OVER IMAGE", "TITLE");
//--> </script>An example of how to change the home button in the menu would be... doRollOver("/home.gif", "http://s2.images.proboards.com/menu/help.gif", "Help");That would change the button to the help button. You can add as many as you like
|
|