The question is probably worded in a very confusing way so here's a quick example http://www.andytimney.com/projects/jquerydropdown/ if you click an "Archive", a dropdown will appear. Now if you want to close it, you need to click "Archive" again. However I want to close it by any click that doesn't target "Option 1", "Option 2". Similar to how Facebook does it if you click the "Account" menu in the top right corner.
The only solution that comes to my mind is to tie an onClick function to either or if that won't work to all elements present on the page except several elements that I'll specify. This solution looks a little hackish to me so I wonder if there is a smarter solution that I am missing.