Skip to content

Instantly share code, notes, and snippets.

@Danilovonline
Last active October 6, 2017 06:34
Show Gist options
  • Save Danilovonline/49488ded22463dc4d7f8d27536a80109 to your computer and use it in GitHub Desktop.
Save Danilovonline/49488ded22463dc4d7f8d27536a80109 to your computer and use it in GitHub Desktop.
JQUERY: ajax
$.ajax({
url: url,
type: 'POST',
data: {},
cache: false,
dataType: 'json',
processData: false, // Don't process the files
contentType: false, // Set content type to false as jQuery will tell the server its a query string request
success: function(data, textStatus, jqXHR)
{
console.dir(data)
},
error: function(jqXHR, textStatus, errorThrown)
{
// Handle errors here
console.log('ERRORS: ' + textStatus);
// STOP LOADING SPINNER
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment