I want to do something when I click anywhere, except when I click a div and it\'s children. This is what I\'ve tried so far, but it\'s not working (clicking on it\'s childr
You could check inside the function for the element in question:
$('body').click( function(e){ if (!$(e.target).is("#calculator") || $("#calculator").has(e.target).length ) { // do your stuff } });