2010-01-26 08:49:53 +00:00
|
|
|
jQuery(function () {
|
|
|
|
function populate_flickr(data, text_status) {
|
|
|
|
var ul = $("ul", "#flickr");
|
2010-01-29 02:41:50 +00:00
|
|
|
// ul.empty();
|
2010-01-26 08:49:53 +00:00
|
|
|
jQuery.each(data.photos.photo, function(i, photo) {
|
|
|
|
var li = $("<li></li>");
|
|
|
|
var a = $("<a></a>");
|
2010-01-27 10:17:02 +00:00
|
|
|
a.attr("href", photo.url_m);
|
|
|
|
a.attr("rel", "prettyPhoto[flickr]");
|
2010-01-26 08:49:53 +00:00
|
|
|
var img = $("<img />");
|
|
|
|
img.attr('src', photo.url_sq);
|
|
|
|
img.attr('alt', photo.title);
|
|
|
|
a.append(img)
|
|
|
|
li.append(a);
|
|
|
|
ul.append(li);
|
|
|
|
});
|
2010-01-27 10:17:02 +00:00
|
|
|
$("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"});
|
2010-01-26 08:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Populate Flickr
|
2010-01-27 10:17:02 +00:00
|
|
|
jQuery.getJSON("http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=aa003631cc50bd47f27f242d30bcd22f&user_id=40215689%40N00&format=json&per_page=20&extras=url_sq,url_m&jsoncallback=?", populate_flickr);
|
2010-01-26 08:49:53 +00:00
|
|
|
});
|