Добавьте это
$('.cd-primary-nav > li > a').on('click',function(){
if(!toggleNav.hasClass('close-nav')) {
toggleNav.addClass('close-nav');
overlayNav.children('span').velocity({
translateZ: 0,
scaleX: 1,
scaleY: 1,
}, 500, 'easeInCubic', function(){
navigation.addClass('fade-in');
});
}else {
//navigation is open - close it and remove navigation layer
toggleNav.removeClass('close-nav');
overlayContent.children('span').velocity({
translateZ: 0,
scaleX: 1,
scaleY: 1,
}, 500, 'easeInCubic', function(){
navigation.removeClass('fade-in');
overlayNav.children('span').velocity({
translateZ: 0,
scaleX: 0,
scaleY: 0,
}, 0);
overlayContent.addClass('is-hidden').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
overlayContent.children('span').velocity({
translateZ: 0,
scaleX: 0,
scaleY: 0,
}, 0, function(){overlayContent.removeClass('is-hidden')});
});
if($('html').hasClass('no-csstransitions')) {
overlayContent.children('span').velocity({
translateZ: 0,
scaleX: 0,
scaleY: 0,
}, 0, function(){overlayContent.removeClass('is-hidden')});
}
});
}
});