JavaScript not working on a page but work on the others

Hi , I have a site with 3 pages , 2 of them are kinda the same the problem is that I add this code to my JavaScript

const closeNav = () => {
    const toggleAnimation = () => {
    const closeOnClick = () => {
        $('.nav-links a').on('click', () => {

//Call changeLink function

and it works fine for 1 page but is not working for the other page . The code is for the nav make , it make it close when you lick on a tag. What happens on the other page is that makes the nav bar to no open at all. 
Here is the site: The coding projects is not working.
I am wondering if this ever happened to you ?