I have a navigation menu that I need to hide after a link has been clicked. Here's my code:
jQuery("#nav a").click(function(e){
    e.preventDefault();
    var body = jQuery('body');
    if (body.hasClass('display-header'))
    {
        body.removeClass('display-header');
        jQuery('.overlay').fadeOut(200);
    }
}); 
The remove class works fine but the link won't go to the right section. (Imagine a single page with anchor links.)
How would you go about this?
Thank you.
 
     
     
    