let me explain what i do need. I have a navigation which opens by jquery. And i would like to close it when i click anywhere in the site.
I found this one here, but in this case every click would close the navigation:
jQuery click() event catch-all?
using
$(document).click(function() {
$("#boxID").hide();
});
But when i click within the navigation e.g. id="boxnewsID", the navigation id="navID" itself closes too. How can i prevent this?
When i try to get a id or sth. which was clicked it only gives the document (logic) back.
I have seen, that facebooks header navigation (message, activity, friendrequest) works the way i need.
Any idea?
I think this should do it:
EDIT:
That doesn’t work, either. Here’s what I have in a page of mine: