I know I've actually done this before, but I've spent the past couple
hours searching Google and my own code and have come up with nothing.
Does anyone know how to trigger events consecutively in RJS? For
instance, if you have something like the following:
page.replace :some_div, render(:partial => "some_partial")
page.visual_effect :fade, "some_element_in_partial"
The fade effect may not occur if the partial has not finished
rendering when the fade effect is called, thereby leaving the
"some_element_in_partial" visible on the page.
I seem to remember having to create a 'do' block and nesting the
effects, while passing in some sort of "serial_event" option or
something like that, but cannot remember exactly.