The Netlobo logo - a Nevada desert landscape

Comments for Fade the Background Color of an Element using Javascript

< Back to the article

8 comments for this article.

RSS Feed Icon Subscribe to the comments for this article

Posted: 2007-09-04 15:52:20 by Andrew
fantastic script... using this as a fade effect for a div that displays a notice to the user. supposed to get his/her attention, using the fade make it look cool and smooth rather than a flashing box...

right now i use multiple setTimeout calls to loop it 10 times... but i want it to loop it infinite. can this be done?

your help would be much appreciated...

Posted: 2007-09-04 15:54:37 by lobo235 - Netlobo Staff Member
Andrew,

The way that you would loop it infinite times would be to call a new setTimeout at the end of each one that executes. So basically, you initiate the first call and then that function does another setTimeout when it is done and so on...

I hope this helps, let us know if you need any further help on this by using our contact form.
Posted: 2007-09-26 12:15:34 by joe
your links to the script and the demo are dead (404), you may want to verify them.
Posted: 2007-09-26 12:16:32 by lobo235 - Netlobo Staff Member
Ok, I fixed the links so they will work now. Thanks for letting us know. We just recently moved to a new host and they must not have been copied over.
Posted: 2008-01-11 10:26:52 by Pawel
I'm fading #000000 to #141416 and it's doing some strange thing in between, like throwing in colors out of wack

any way to fix this?
Posted: 2008-01-14 10:00:47 by Fer
It's working in html. very great :d
no i want to combine this piece of script with flash... any clue on how to do this?

this is what i have so far in the SWF:

getURL("javascript:NLBfadeBg('b1','#FF0000','#FFFFFF','1000')")
Posted: 2008-01-14 10:02:10 by lobo235 - Netlobo Staff Member
Fer,

I am not very familiar with flash or flash programming. Can anyone else help out here?
Posted: 2008-08-25 13:22:55 by tim
thanks for the easy working script!

RSS Feed Icon Subscribe to the comments for this article

Post your comment for the Fade the Background Color of an Element using Javascript article:

Name (required) (letters and numbers only):
Email (required) (will not be published):
Website (include http://):
Comment (required): (HTML tags allowed: pre, strong, em, b, i)