How to make Dropdown menu hiding

i need help to changed dropdown menu to hiding like when you click category