Switching elements for a smoother animation