Skip to content

Instantly share code, notes, and snippets.

@marioflores
Created June 13, 2013 02:29
Show Gist options
  • Save marioflores/5770825 to your computer and use it in GitHub Desktop.
Save marioflores/5770825 to your computer and use it in GitHub Desktop.
Sample ajax call with jQuery
$.ajax({
url: "ajax.txt",
cache: false,
success: function(html){
console.log(html);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("Status: " + textStatus); alert("Error: " + errorThrown);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment