It will only close if i click .search again. I want to make it so that it closes if the user clicks either search or anywhere outside the .search-result div, can anyone help me with this?
If i open a div with the on click function, I want to toggle back or hide() it if i click anywhere outside it or clicking any other button. Is this possible?
if i click b1 to show bshow1 and then i want to close it. ATM I can only close it by clicking the b1 button again. But I want to be able to close it by clicking outside bshow1 aswell.