add body click event to close the dropdown