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
Instead of
$('body').on('click', '* :not(#calculator)', function(e){ });
You can use (this version is preferred as it is more performant)
$("body").on("click", ":not(#calculator, #calculator *)", function(e){ });
or
$("body :not(#calculator, #calculator *)").on("click", function(e){ });