Skip to content

Instantly share code, notes, and snippets.

@bitbrain
Created September 10, 2013 11:21
Show Gist options
  • Save bitbrain/6508031 to your computer and use it in GitHub Desktop.
Save bitbrain/6508031 to your computer and use it in GitHub Desktop.
function doAjax(datasource) {
$.ajax({
type: "GET",
url: datasource + "?callback=?",
dataType: "json",
crossDomain: true,
async: false,
jsonp: false,
success: function(data) {
// Do something with json data
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment