Skip to content

Instantly share code, notes, and snippets.

@Jarry1250
Created February 27, 2014 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jarry1250/9252306 to your computer and use it in GitHub Desktop.
Save Jarry1250/9252306 to your computer and use it in GitHub Desktop.
var url = 'http://www.foo.com/bar.jsonp?callback=cb';
$.ajax({
url: url,
jsonpCallback: 'cb',
dataType: 'jsonp',
success: function( data ) {
console.log( 'Success A' );
}
});
$.getJSON(url, null, function (data) {
alert('Success B');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment