Implements #13622.

options.animation can now accept a class name and toggle it on show and hide events.