Hey,
I am trying to create a jQuery click function that will close a div when you click on anything besides that div. My problem is that there is a search field and another button inside that div that need to stay open if you click on them.
My current function is:
$("*:not(#header)").click(function() {
$('#header').slideUp({
duration: 550,
easing: 'easeOutExpo'
});
});
I want to also say "and is not '#categoryMore' and is not '#headerSearch'" but the syntax I've been using have not been working.
$("*:not(#header, #categoryMore, #headerSearch)")
and
$("*:not(#header), *:not(#categoryMore), *:not(#headerSearch)")
Any ideas? Thanks so much for your help!