collapse nav on mobile on state change