Collapse menu when search icon is clicked