homepage Welcome to WebmasterWorld Guest from 54.226.147.84
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
BackgroundColor fade-to-white function
lobo235

10+ Year Member



 
Msg#: 3250647 posted 11:49 pm on Feb 12, 2007 (gmt 0)

I am having trouble with a JavaScript function I wrote that will fade the background color of an element to white using the given number of steps. The problem is that it runs so fast that you never see the fading unless you put an alert in between each fade step. Does anyone know how I can put a delay between each fade step so that the fade is noticeable to the user?

 

lobo235

10+ Year Member



 
Msg#: 3250647 posted 11:56 pm on Feb 12, 2007 (gmt 0)

Actually, I just figured it out. I used the setTimeout function to execute each fade step after a specific delay. It seems to be working nicely now.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved