I always lose a lot of time or this, I need quick inverse of selector in jQuery?
Everything but $('.example');
I even tried
$(':not(.example)')
I guess that's what you are looking for:
$("body").on("click", function() {
// close div
});
$("#element").on("click", function(e) {
e.stopPropagation();
// open div
});
DEMO: http://jsfiddle.net/NamAJ/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With