i have this HTML page
a b c d
$("body > div").click(function() { if ($(this).attr("id") == "in_or_out") { // inside } else { // not inside } });
EDIT: just learned, that there is a negate:
$("body > div:not(#in_or_out)").click(function(e) { // not inside });