View Single Post
  #6  
Old 28-05-2010, 10:28 PM
DavidU's Avatar
DavidU (Dave)
Like to learn

DavidU is offline
 
Join Date: Jul 2007
Location: melbourne
Posts: 4,835

Quote:
Originally Posted by multiweb View Post
It it's reasonably small you can do an animated GIF file otherwise load 2 JPEGs and do a quick javascript rollover like so (very simplistic and you can use any size):

//*********************
// in page header
//*********************
<SCRIPT language=JavaScript>
<!--
function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() {
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</SCRIPT>

//*********************
// in your page body
//*********************

<img name="mypic" border="0" src="neutral.jpg" alt="mypic" onmouseover="MM_swapImage('mypic',' ','rollover.jpg',1);" onmouseout="MM_swapImgRestore();">
Reply With Quote