Say there are some elements floating around, and I\'m trying to do some when I click ANYTHING(divs, body, whatever...) but the one specified (e.g. div#special).
I\'m
You could also do
$(document).bind('click', function(e) { if(!$(e.target).is('#special')) { // do something } });
or if div#special has child elements you could do
$(document).bind('click', function(e) { if($(e.target).closest('#special').length === 0) { // do something } });