0
我正在与lightbox2项目工作。 不幸的是,每次我尝试点击一张图片将其加载到灯箱中时,它仍保持空白。
我检查了请求..图像从Instagram正确加载。 我的项目:lightbox2空白
这是我的请求的代码:
function getImages(searchText){
//removing the the last images of the search if there were any
$("img").remove();
//making the ajax call
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "https://api.instagram.com/v1/tags/"+searchText+"/media/recent?access_token=HEREISMYTOKEN",
success: function(data) {
for (var i=0; i <= 6; i++) {
var image = data.data[i].images.standard_resolution.url
$("#images").append("<a href='"+image+"' rel='lightbox[insta]' title='Alternately you can press the right arrow key.' ><img src="+data.data[i].images.thumbnail.url+" alt='Plants: image 2 0f 4 thumb' /></a>")
Lightbox.initialize();
};
}
});
}
任何想法如何解决这一问题? 非常感谢!
非常感谢!这对我有效。 – user1340431 2012-07-30 16:32:15