Skip to content

Instantly share code, notes, and snippets.

@dannylloyd
Created October 4, 2011 18:53
Show Gist options
  • Select an option

  • Save dannylloyd/1262454 to your computer and use it in GitHub Desktop.

Select an option

Save dannylloyd/1262454 to your computer and use it in GitHub Desktop.
Gets data from jsonp source using jQuery
var url = "http://api.twitter.com/1/statuses/user_timeline/codinghorror.json";
$.getJSON(url + "?callback=?", null, function(tweets) {
for (i in tweets) {
tweet = tweets[i];
$("#result").append(tweet.text + "<hr />");
}
});
' Source : http://stackoverflow.com/questions/2681466/jsonp-with-jquery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment