-1
我需要使用Miromannino對齊圖庫(http://miromannino.github.io/Justified-Gallery/),但我需要它來顯示從Flickr檢索的圖像。如何通過API在對齊圖庫中顯示Flickr圖像?
代碼終於下來使用Ajax通過API retreiving從Flickr照片:
$.ajax({
url: "https://api.flickr.com/services/rest/",
data: {
method: "flickr.photos.search",
api_key: "671aab1520e2cb69e08dd36a5f40213b",
tags: "beach,fashion",
format: "json",
nojsoncallback: 1
},
success: function (response) {
$.each(response.photos.photo, function (index, value) {
$("#mygallery").append("<div><img src='http://farm" + value.farm + ".staticflickr.com/" + value.server + "/" + value.id + "_" + value.secret +".jpg'></div>");
})
}
});
但我就是不明白如何在對齊庫添加。