If I have a set of jquery elements var elements = $('.containers');
How can I select everything in the body but that set of elements and attach a click event to it? I've tried something like,
var filtered = $('*').filter(function(index){
return elements;
});
$(document).ready(function(){
$('body').on('click', filtered, function(){
alert('something on body was clicked that wasn't "element"');
});
});
*This doesn't work at all