Skip to content

Instantly share code, notes, and snippets.

@wizact
Created December 22, 2012 12:18
Show Gist options
  • Save wizact/4358675 to your computer and use it in GitHub Desktop.
Save wizact/4358675 to your computer and use it in GitHub Desktop.
Cross-Domain Ajax call using JQuery and JSONP
$.ajax({
url:'http://your/url?callback=?',
data:{ apikey: 'secret-key-or-any-other-parameter-in-json-format' },
dataType:'jsonp',
crossDomain: 'true',
success:function (data) {alert(data.first_name);}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment