OZONE Asylum
Forums
DHTML/Javascript
Elastic menu
This page's ID:
30033
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[quote] [b]poi said:[/b] Animations should NEVER be done with a bajillion of setTimeout( "someCode", delay ) or setTimeout( aFunction, delay ). Firing many timers is gonna hurt the memory and performance. And using hardcoded delays makes the duration of the animations depend on a specific speed. This is doomed to ruin the user experience on any machine/device significantly slower/faster than that of the developer. Always prefer having a single setInterval( updateAnimation, delay ) and define your animations' duration in ms. This way, they will run at the same speed on any machine/device. [/quote] Could you please explain why one setInterval beats multiple setTimeouts (each one fired after the other has stopped) a little more or were you talking about a situation slightly different than this?
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »