Does it disappear when more or less than 979px? Obviously, this part of code handles it:
$(window).on('resize',function(){
if($(this).width() > 979){
$('header nav ul').removeAttr('style');
}
});
When you resize the screen, this line - $('header nav ul').removeAttr('style')
- simply drops entire style attribute of the element. Seems like the menu is hidden by having inline CSS set, i.e. style="display: none"
and thus the menu appears when your code removes style attr.