There’s a Prototype helper method called delay, so you can more precisely say when something will happen.
For example, you can do stuff like this inside your RJS files:
page["old_element"].visual_effect :blind_up, :duration => 0.5
page.delay(0.5) do
page.replace :old_element, :partial => "new_element"
page["new_element"].visual_effect :blind_down
end
Check out the delay method.
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.