Click to See Complete Forum and Search --> : fade-in menu


xaviorg
03-09-2003, 01:43 AM
ok, i have this script for my site's dynamic nav-bar, but how do i make the document.menu.folders[curobj] object fade in?

menu.js
<!--
var i = 0
var ie5 = document.all ? 1 : 0
var ns4 = document.layers ? 1 : 0
var ns6 = document.getElementById && !document.all ? 1 : 0
document.menu = new Object()
document.menu.folders = new Array()

function expand(curobj) {
for (i in document.menu.folders) {
document.menu.folders[i].display = 'none'
i++
}

i = 0
document.menu.folders[curobj].style.display = ''

return 0
}

function contract(curobj) {
document.menu.folders[curobj].style.display = 'none'

return 0
}

function getFolders() {
if (ie5) {
for (i = 0; i < document.all.length; i++) {
if (document.all[i].className == 'FOLDER')
document.menu.folders[document.menu.folders.length] = document.all[i]
}
} else if (ns6) {
var contained = document.getElementsByTagName('div')

for (i = 0; i < contained.length; i++) {
if (contained[i].getAttribute('class') == 'FOLDER')
document.menu.folders[document.menu.folders.length] = contained[i]
}
}

return 0
}

function doExpand() {
return
}
//-->


any help will greatly be appreciated

Nevermore
03-09-2003, 01:43 PM
[CODE]
hex=255 // Initial color value.


if(hex>0) { //If color is not black yet
hex-=11; // increase color darkness
document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")";
setTimeout("fadetext()",20);
}
else
hex=255 //reset hex value
}
CODE]

webby
03-09-2003, 03:46 PM
[CODE]
hex=255 // Initial color value.


if(hex>0) { //If color is not black yet
hex-=11; // increase color darkness
document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")";
setTimeout("fadetext()",20);
}
else
hex=255 //reset hex value
}
CODE]

That should do the trick hope you like it

Nevermore
03-09-2003, 03:47 PM
Didn't I just say that?

webby
03-09-2003, 03:48 PM
you asked me i told you and then you nicked ungrateful piece of ****!

Nevermore
03-09-2003, 03:49 PM
These forums are designed for sensible discussion. Why do you insist on being stupid?

xaviorg
03-09-2003, 04:12 PM
lol, thanks BOTH of you :D

pyro
03-09-2003, 05:31 PM
webby -

What exatly was the point in your posting cijori's code in the post right under his? I think that xaviorg would be quite capable of reading it out of cijori's post...

webby
03-10-2003, 03:47 AM
the code was mine, i gave it to himso you can shut-up Pyro.

pyro
03-10-2003, 07:19 AM
You know what webby? I find that quite hard to believe. Expecially because you did pretty much this same thing in another thread. You took someone elses code, changed one line and called it your own. :mad: