Jump to content

JavaScript question


Recommended Posts

Okay look at my site: www.berzerkerweb.com

You see the site tab links? When you hover over them they turn lighter blue instantly. How do I go about making them fade to the blue?

Heres half of a fade code I started and then I got lost..

<script language="JavaScript1.2">

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=40
}

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>

This will go in the actual link code..

style="filter:alpha(opacity=40);-moz-opacity:0.3"
onMouseover="high(this)" onMouseout="low(this)"

Edited by Batch User
Link to comment
Share on other sites


  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...