Domain Discussion Board

Go Back   Domain Discussion Board > Web Hosting & Web Design > Scripts

 
Reply
 
LinkBack Thread Tools Display Modes
Gradual Highlight script
Old
  (#1 (permalink))
andrew
Senior Member
andrew is an unknown quantity at this point
 
andrew's Avatar
 
Status: Offline
Posts: 212
Points: 67.2
Bank: 0.4
Total Points: 67.6
Donate
Join Date: Nov 2006
Rep Power: 0
Talking Gradual Highlight script - 11-05-2006, 10:36 AM

INSERT CODE BELOW TO HEAD

<style type="text/css">
.gradualshine{
filter:alpha(opacity=30);
-moz-opacity:0.3;
}
</style>
<script type="text/javascript">
/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var baseopacity=30
function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",50)
}
function slowlow(which2){
cleartimer()
instantset(baseopacity)
}
function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}
function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}
function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.sty le.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
</script>

INSERT THIS CODE TO AN IMAGE

class="gradualshine" onMouseover="slowhigh(this)" onMouseout="slowlow(this)"

EXAMPLE:
<a href="whatever.htm"><img src="mygif.gif" border=0 class="gradualshine" onMouseover="slowhigh(this)" onMouseout="slowlow(this)"></a>


http://Destin-Designs.co.nr - Custom Design 4 U
10$ - 22$
   
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 0.1
Points Per Thread: 15.0
Points Per Reply: 5.0


Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Script giomanach Scripts 9 11-10-2006 08:08 AM
What script is that? s-Lec Scripts 2 10-16-2006 12:19 AM
A good directory script beauty-silenced Scripts 4 08-08-2006 11:32 AM
copyright HTML script? masta Scripts 1 07-05-2006 08:44 PM


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 ©2007, Crawlability, Inc.