View Full Version : spicing up links


Lakini's Juice
05-30-2003, 02:47 PM
why is it when you are looking for something specific you can never find it. I want to spice my links up a little with java script. Specifically the script where when you hover over it it makes a left to right motion with color if you know what I mean. I just can't remeber what it's called and can't find it. Anyone know what I mean?

Like on Lana's (http://www.after-shock.net/) site but without the bold part...

MelodyUkOk
05-30-2003, 02:57 PM
I know what you mean, but I dont know how. I cant remember the site but there was one, which had a code for fading links. I dont think this helps but you could try and search in google or something.

Lakini's Juice
05-30-2003, 03:13 PM
Thanks anyway Melody!

Ok well I think I found it it's called gradientwipe (found it on dodo's new world). I have the code but it still isn't working. Maybe someone else can look and see if they can find the problem?

here is what I have for linkhighlight.htc:


<public:component>
<public:attach event="onmouseover" onevent="domouseover()">
<public:attach event="onmouseout" onevent="domouseout()">

<script language="javascript">

function domouseover()
{
with(element)
{
filters.item(0).Apply();
filters.item(0).Play();
}
}

function domouseout()
{
with(element)
{
filters.item(0).Apply();
filters.item(0).Play();
}
}

</script>

</public:component>

and then in my css sheet I have:


A:hover { color: #A6AE6B; text-decoration: none; cursor: default; behavior:url(linkhighlight.htc);filter:progid:dxim agetransform.microsoft. gradientwipe(duration=1);
}

you can see the site here (http://simpleillusions.com/new/test.html) as you can see it's not working. Any ideas?

Gadget
06-01-2003, 09:18 AM
I found this script at http://damag3d.net/indexx.html (Damag3d)
Check the tutorial section under javascript to see it in action!
May be easier than what you are using currently perhaps?

<script language="JavaScript1.2">

message="MESSAGE-YOU-WANY"
var neonbasecolor="COLOR-TO-START-WITH"
var neontextcolor="COLOR-YOU-WANT-IT-TO-CHANGE-TO"
var flashspeed=115 //in milliseconds

///Don't change anything below this line/////

var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')

//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor

if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1000)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>

Lakini's Juice
06-01-2003, 12:29 PM
Hey cool thanks! That site has some great tutorials!! And I like that one. I found out what the problem was anyway. It was my DOCTYPE.

Gadget
06-02-2003, 10:26 PM
It does have some useful tutorials, I found the link here at the forum. :D
Congrats on getting the script to work!