Answer the question
In order to leave comments, you need to log in
How to do the correct refactoring of ajax requests?
Hello.
About 2 months ago, I wrote a lot of code, according to the principle - "It worked."
var b = $("body");
b.on(event, element, function (e) {
// .. код
$.ajax({
// .. код
})
})
Answer the question
In order to leave comments, you need to log in
You need fullajax.
Send two parameters - a control command and arguments.
You return two parameters - a control command and data.
Libraries for refactoring AJAX requests?
Push it into one function with the necessary arguments, and that's all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question