I have this code over and over again and wanted to simplify this in a kind of plugin or function. Information I usually use, Type = > ' get ' and ' post ' and url , and return I deal in sequence with jquery .
$.ajax({
type: '',
url: '' ,
dataType : 'json',
//data: jsonString,
beforeSend: function () {
//SPINNER
},
success: function (data, textStatus, jqXHR) {
},
complete: function () {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});