|
Advertisement |
when we trigger the event mouseover image should brighten
Posted On September 16, 2008 by Peter Sebastian Language:
You can do this by using JavaScript. Add the following code in your html page to achieve the reult.
<script>
function makevisible(cur,which){
strength=(which==0)? 1 : 0.6
if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}
</script>
<p><img style="filter:alpha(opacity=60);-moz-opacity:0.6" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)" src="images/thisImage.jpg" border="0" target="_top" alt=" " onmouseover="window.status=' '; return true;" /><br />
Comments
#2
Arup Senapati commented, on March 30, 2009 at 1:13 p.m.:
Hi Good job!
But not working in Safari, Opera, AOL and Google Chrome.. It is only working in IE and Mozilla Firefox.
Can you please check this.
Thanks
Arup
#3
Amit Mitra commented, on March 31, 2009 at 3:18 p.m.:
The filter clause in style attribute works with IE Only. It even dosent work on mobile web explorers






Amit Kumar Chakraborty commented, on March 21, 2009 at 3:04 a.m.:
Great code.. great.. works by DIQ team