Repeat specific scripts after loading jQuery AJAX

I need some scripts to recover after loading AJAX. How could I do this?

+3
source share
3 answers

You can use the callback to call the functions you want to restore.

$.ajax({
    url: '/url',
    success: function() {
        func1();
        func2();
    }
});
+6
source

If you just need to re-bind events, try the live method .

+1
source

- JavaScript . , , . jQuery :

0
source

Source: https://habr.com/ru/post/1722321/


All Articles