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