Answer the question
In order to leave comments, you need to log in
Why does jquery stop working when refreshing a page via ajax?
Friends, hello!
Here is a question. Jquery code stops working when refreshing a page via ajax? JS works but JQ doesn't.
In principle, I understand why it does not work.
Since wrapped in . The ready event doesn't happen without a render.
How can this be bypassed?
Opencart 3 engine $(document).ready(function()
Answer the question
In order to leave comments, you need to log in
Issue resolved.
I copied all the code into the script tag in the HTML document without the ready event and it all worked :)
Thank you all! :)
1. What are the errors in the firebug?
2. If your home content changes after an ajax request, one or another method declared in $(document).ready(function() does not know anything about the new home element that has appeared.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question