Friday, November 4, 2011

jQuery AJAX cross domain request

Cross domain AJAX request

$(document).ready(function() {
  $.getJSON('http://twitter.com/users/usejquery.json?callback=?', function(json) {
    //get information about the user usejquery from twitter api
    $('#twitter_followers').text(json.followers_count);
    //get the follower_count from the json object and put it in a span
  });
});

http://usejquery.com/posts/9/the-jquery-cross-domain-ajax-guide

No comments: