I need to remove the .visible class when clicking in the empty space of a full-height header.
The header contains a container that does not have full height.
Clicking on the container or its links should not trigger the removal of the class, but clicking on the remaining space below the container should.
Can this be achieved with the current HTML and CSS structure?
$('body').on('click', '.button', function(){
$('body').toggleClass('visible');
});
$('.visible *:not(.container)').click(function() {
alert('clicked the outside');
$('body').removeClass('visible');
return false;
});