【发布时间】:2016-06-16 03:54:27
【问题描述】:
我需要使用 Miromannino Justified Gallery (http://miromannino.github.io/Justified-Gallery/),但我需要它来显示从 Flickr 检索到的图像。
我获得了使用 Ajax 通过 API 从 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>");
})
}
});
但我就是不明白如何在 Justified Gallery 中添加。
【问题讨论】:
标签: javascript jquery ajax api flickr