FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Image transparency script





yule
When u go with mouse on image it becomes normal, but then the mouse is somewhere else image becomes transparent
Copy this to <head>
Code:
<script language="javascript">

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
</script>

And this to <img src="pathtoimage/image.jpg" >

onmouseover="nereidFade(this,100,20,30)" style="FILTER: alpha(opacity=20" onmouseout="nereidFade(this,30,50,80)"
I hope u like it
Related topics
Can someone make me a php script?
image timeout script?
Tutorial: Image Rollovers w/ Javascript
How to show PNG image transparency in IE?
Hall of Hero's site
A Prob
Need Help Please (I offer all my frih$)
quite simple file upload
Two Scripts that I need!
Image Gallery and ImageShack
Display random image on foreign site
image php sripting that made a image refreshed every loaded
Great free photo editor
Image hosting issue
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.