0
我不知道如何可以创建与网址加载页面的图像的收藏夹链接 Fancybox - 如何从网址加载图片?
这里是我的代码,但它不工作:
$("a.picture").click(function() {
$.fancybox({
'padding' : 0,
'overlayShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'titlePosition' : 'over',
'type' : 'image',
'titleFormat' : function(title, currentArray,
currentIndex, currentOpts) {
return '<span id="fancybox-title-over">' + (currentIndex +
1) + '/' + currentArray.length + (title.length ? ' ' +
title : '') + '</span>';
}
});
return false;
});
和HTML代码
<a class="picture" href="http://localhost/test/my_page.html" title="Picture Page">Link</a>
谢谢!
如果打开一个html页面,你应该设置''type':'iframe'而不是'type':'image' – JFK 2012-03-11 10:35:01