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
I once solved this a little easier than the other answers, whithout taking care that click really goes down the DOM-Tree
just check if your element is hovered ;)
$(document).on('click', function (e) {
if($('#special:hover').length > 0){
// on our special element
}else{
// not on our special element
}
});
Cheers