Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 1

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 = () => {
        $('.nav-links').removeClass('nav-active');
    };
    const toggleAnimation = () => {
        $('.burger').toggleClass('animation');
    };
    const closeOnClick = () => {
        $('.nav-links a').on('click', () => {
            closeNav();
            toggleAnimation();
        })
    };

//Call changeLink function
closeOnClick();

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: https://hungry-pike-43b2a3.netlify.com/coder.html The coding projects is not working.
I am wondering if this ever happened to you ?