1
senzaciona
image is little dark
  • 2006/7/8 20:33

  • senzaciona

  • Just popping in

  • Posts: 64

  • Since: 2005/3/6 1


along time ago you have in this page links with images which have javascript effect that were little dark and when you come over it, then it becouse normal.

Can someone tell me the code for this?

thx

2
snow77
Re: image is little dark
  • 2006/7/8 21:08

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I've done that effect before with this JS :

Example:
<head><script language="JavaScript1.2">

//Gradual-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 high(which2){
theobject=which2
highlighting
=setInterval("highlightit(theobject)",50)
}
function 
low(which2){
clearInterval(highlighting)
if (
which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function 
highlightit(cur2){
if (
cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

</
script>
<
title>Untitled Document</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</
head>

<
body>
<
div align="center"
  <
table  width="100%" cellpadding="0"  cellspacing="0">
    <
tr>
      <
td><div align="center"><a href="http://www.yourdomain.com"><img src="http://www.youdomain.com/yourimage.gif" width="91" height="32" border="0" style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseOver="high(this)" onMouseOut="low(this)"></a></div></td>
    </
tr>
  </
table>
</
div>
</
body>


I think smarpartner and smartclient modules have blocks with this effect to it too.
www.polymorphee.com
www.xoopsdesign.com

3
senzaciona
Re: image is little dark
  • 2006/7/8 21:31

  • senzaciona

  • Just popping in

  • Posts: 64

  • Since: 2005/3/6 1


cool

thx very much, works superb.

thx again
regards

Login

Who's Online

236 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 236


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits