Javascript not working at deployment


All my javascript files work as expected in development. As soon as I published the website one of my functions is not working. I have no idea why this is happening, everything works fine on preview on my local machine. I have multiple different pages, each javascript function would ideally run for and be accessible from its specific page. When I visit different pages I can see that the javascript files are linking to all pages becuase I see event listeners not being able to find divs that are on other pages, I dont know if this contributes to the problem. Also, I dont know if the minification process if messing with the code. I added some alerts at the beggining of the function to debug. Again, it works in preview mode but not in deployment. In deployment the alerts are not activated. When i copy and paste the javascript to the terminal it works as expected. The site name is

Answer. Go to your javascript file. Double click…asset availability…make your choice from there. These steps allow you to assign your javascript to their required page. Not doing so can invalidate necessary portions of javascript for the current page.