basket close on click outside and page transition