Efficiency and length of functions when perfomring similar tasks to classes and IDs
Use toggleClass instead of:

if ($(this).hasClass('active')) {
    $(this).removeClass();
// When in initial state, add active class
} else {
    $(this).addClass('active');
}

You can map the event handlers for multiple classes:

['about', 'contact', ...].map(cls =&gt; {$(`.${cls} a`).click(...)}