Answer the question
In order to leave comments, you need to log in
Why can Js scripts stop working?
Hello. Please tell me what I need to google to fix this problem.
I have an online store website, I connect a js cart there, add a js script to the base template and the cart works, but another js script responsible for switching between categories stops working and the burger stops dropping out in the mobile version
Answer the question
In order to leave comments, you need to log in
In theory, a script can use variables from the global scope (window). You can try wrapping the scripts in self-executing functions, this can help, although the chance is very small. If it does not help, you need to look at the scripts themselves in more detail.
(function () {
// ... код
})()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question