Skip to content

Instantly share code, notes, and snippets.

@turboza
Last active December 20, 2015 01:59
Show Gist options
  • Save turboza/6053292 to your computer and use it in GitHub Desktop.
Save turboza/6053292 to your computer and use it in GitHub Desktop.
AJAX Sample Code with JSON parsing
$.ajax({
url: "example.com/ex.json",
type: "get",
data: {var1:'value1',var2:'value2'},
dataType:'json',
success: function(content){
console.log(content.value);
},
error:function(){
console.log('error');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment