View Full Version : Side Effect with Animation v1.0a2

26 Feb 2007, 3:37 PM
I was changing up some code and wanted to point this out to see if this is an issue.

This snip works great. Props for the inline animation.


but it had side effect when I put


with the update at the end it never shows any code. and doesn't react to the pause.



uses the pause but never shows the text until it slides out.

If I am not using this right then could someone please advise. If this is a bug then I hope this helps.

Tested in: IE7, FireFox

26 Feb 2007, 7:34 PM
At the moment, it is slightly confusing, but you cannot chain just any Element methods together with effects like that. The reason is that only the Fx methods go through the internal effects queue so that they get sequenced correctly. Adding non-Fx method calls (like update) in the chain can have unexpected results.

One thing you can do is pass a callback into the effects methods, so you might try adding a separate function (it can be anonymous) that does your final update, and pass that in as the callback to your last effect so that it gets called after the slideOut completes.

We'll be sure to clarify this limitation once the docs have been updated.