Skip to content

Instantly share code, notes, and snippets.

@jimbojw
Created August 3, 2010 02:31
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 jimbojw/505728 to your computer and use it in GitHub Desktop.
Save jimbojw/505728 to your computer and use it in GitHub Desktop.
$(function() {
var $ol = $('#blocked_list').find('ol').eq(0);
$.ajax({
url: 'http://api.twitter.com/1/blocks/blocking.json',
dataType: 'jsonp',
success: function(list) {
$ol.empty();
$.each(list, function(i,item){
$("<li><a><img /><span></span></a></li>")
.find("a")
.attr("href", "http://twitter.com/" + item.screen_name)
.attr("title", item.name)
.end()
.find("img")
.attr("src", item.profile_image_url)
.attr("alt", item.name)
.end()
.find("span")
.text(item.name)
.end()
.appendTo($ol);
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment