I have a little script that makes a little bottom mounted "quick menu" close when the user clicks anywhere on the page. I used 'body'
as the selector. However, I don't want it to close when the user clicks inside the menu (which is inside the div foot
).
I've tried putting the selector as '*'
then using .not('.foot body')
, however that doesn't seem to solve anything. What are the chances I've actually typed the code wrong?
$(document).ready(function(){
$('*').not('.foot body').click(function(){
if($('.foot').hasClass('slide-up')) {
$('.foot').addClass('slide-down', 1200, "easeOutQuad");
$('.foot').removeClass('slide-up');
$('.UP').text('Up ↑');
} else {
}
});
});
Edit: It does work fine, and closes as it should, it's just the fact I don't want .foot
to be able to close it