Today I will show you how to make your buttons flicker when a mouseover is happening.
Example:
www.covclan.zeeblo.com/covclan
#1 At the tope of your HTML document put this code between the <link> or <META> tags and the <HEAD> tags that are at the bottom.
Quote:
<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.MozOpa city)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
|
#2. Goto to your first button and look for the part where it says
<img border="
YourSize"
src="images/
yourbutton.jpg(w/e format)
then after that type:
Quote:
style="filter:alpha(opacity=40);-moz-opacity:0.3"
onMouseover="high(this)" onMouseout="low(this)" width="170" height="21
|
The End Result Should look something like this
Quote:
<td height="yourheight" background="images/yourbuttonbackground.jpg"><a href="yourpage.html"><img border="yoursize"
src="images/yourbutton.jpg" style="filter:alpha(opacity=40);-moz-opacity:0.3"
onMouseover="high(this)" onMouseout="low(this)" width="yoursize" height="yoursize"></a></td>
|
The Top Should look like this:
Quote:
<head>
<title>YourTitle</title>
<link rel="stylesheet" href="style.css" type="text/css"> |<-- This stuff does not apply.
<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.MozOpa city)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
</head>
|
All things in red depend on your website. You can screw with the Opacity to fit your theme.