Skip to content

Instantly share code, notes, and snippets.

@SiTaggart
Created February 6, 2012 22:46
Show Gist options
  • Select an option

  • Save SiTaggart/1755633 to your computer and use it in GitHub Desktop.

Select an option

Save SiTaggart/1755633 to your computer and use it in GitHub Desktop.
Simple $.ajax example
$.ajax({
url: ,
data: {},
dataType: JSON,
type: POST,
success: function(data, textStatus, XMLHttpRequest) {
// Do something with the data
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//handle error
},
complete: function(XMLHttpRequest, textStatus) {
//something that happens on complete?
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment