Hey there! Sava Chankov a écrit : > Excuse me for not expressing myself well - I meant, is there a way to tell > Effect.Fade that it must block execution of the calling function when called > (and not start fading the element in background) without having to put > Element.remove(row) in afterFinish callback?
Well, not as such. You see, the only way to make an effect like that is to use timers. By definition, they execute in an asynchronous manner. JS is devoid of synchronization primitives, so you must use callbacks. > I was confused, because at first I put only Element.remove in afterFinish. > Then > I realized that the all statements following Element.remove must go in the > callback. If they depend on the remove, yes. You might put them in a standalone function, and call this function from the afterFinish callback. > The element with the same id as the row is appended after removal of > the row, so there are no duplicate ids in the DOM. Excellent. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---