View Full Version : Pause while scriptaculous effect completes?

09-07-2006, 10:16 PM
Is it possible to pause the script in a way, until a scriptaculous effect complets? At the moment, the effects are half way through scrolling/fading, while the script continues.

Many thanks in advance.

09-08-2006, 03:00 PM
There's no pausing facility in JavaScript, but here's a solution: Place all code you want to execute after the effects in a separate function. Then use setTimeout to call that function after a given amount of time, so as to let the effects complete. The only problem with this is that you need to know the amount of time in advance, or need to poll to see when it's complete.