我正在使用 prettyphotos 来显示幻灯片和灯箱,但我如何才能获得灯箱中显示的当前照片 ID。
PrettyPhotos 提供回调函数 changepicturecallback: function()
我试过了,但无法获得当前的照片 ID。
我正在使用此代码
请帮助
$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'light_square',slideshow:5000,
changepicturecallback: function(){
//Run on every image change
$('.gallery-list li').index($('.selected')).find('img').attr('id');
}
});