Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to make a thumb opaque after being clicked

Status
Not open for further replies.

brian214

Programmer
Mar 18, 2003
1
US
do you know if there is any way to do this with a CSS
 
Here you go, see if this is any good for you. Filters are IE only though.

<html>
<head>

<SCRIPT LANGUAGE=&quot;javascript&quot;>

function fadeIt()
{
document.getElementById(&quot;thePic&quot;).filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity = 50;
}
</SCRIPT>

</head>

<body>

<img id=&quot;thePic&quot; src=&quot;../westworldwithtitle.gif&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);&quot; onClick=&quot;fadeIt()&quot;>

</body>
</html> Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Sorry, you said using css.
Well, this will change the class of the image when you click it to a different css class.
Still IE only though.

<html>
<head>
<style>
.full{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100);
}

.half{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
}
</style>

</head>

<body>

<img id=&quot;thePic&quot; class=&quot;full&quot; src=&quot;../westworldwithtitle.gif&quot; onClick=&quot;this.className='half'&quot;>

</body>
</html> Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top