I want to set up all the callbacks and other settings, using something like this:
var jqxhr = $.ajax({ url: "example.php" })
.success(function() { alert("success"); })
.error(function() { alert("error"); })
.complete(function() { alert("complete"); });
But i don’t want it to automatically start the AJAX request, because I want to trigger it later, by myself.
If it is possible, then how can i do it?
Just put your code in function and call it whenever you want.