properly switches between elements within a menu