IH8Purple
Joined: 29 Feb 2004 Posts: 105 Location: Ottawa, Canada
|
Posted: Mon Mar 01, 2004 9:44 am Post subject: Highlight Image Script |
|
|
Step 1: Insert the below into the <head> section of your page:
| Code: | <script language="JavaScript1.2">
//Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
function makevisible(cur,which){
strength=(which==0)? 1 : 0.2
if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}
</script> |
Step 2: Finally, insert the below inside the <img> tag of all of the images you want the effect applied to:
| Code: | | style="filter:alpha(opacity=20);-moz-opacity:0.2" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)" |
_________________ To Hell With Purple HQ (under constuction)
Cool webmaster forum |
|