我总是浪费很多时间或者这个,我需要在 jQuery 中快速反转选择器吗?
Everything but $('.example');
我什至试过
$(':not(.example)')
我总是浪费很多时间或者这个,我需要在 jQuery 中快速反转选择器吗?
Everything but $('.example');
我什至试过
$(':not(.example)')
我想这就是你要找的东西:
$("body").on("click", function() {
// close div
});
$("#element").on("click", function(e) {
e.stopPropagation();
// open div
});
演示:http: //jsfiddle.net/NamAJ/