General-purpose animation for showing and hiding text