I want to close a little pop-up box in page when user has clicked anywhere on the page other than box area. how to find it?
@jAndy's solution is good, but I wanted to mention Ben Alman's "Outside Events" plugin as well. Here's a quick example using it:
$("#popup").bind("clickoutside", function(event){ $(this).hide(); });