Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inverse selector jQuery [closed]

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)')

like image 583
Arcagully Avatar asked Nov 18 '25 00:11

Arcagully


1 Answers

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/

like image 95
VisioN Avatar answered Nov 19 '25 14:11

VisioN