2012-05-09 79 views
1

对于fancyBox 1.x有一个信息如何格式化标题。我失去了这个新版本...fancyBox 2:格式化标题

我要添加标题如“x的图像1。你可以在这里找到孔画廊[=链接]”

回答

7

有关的fancybox V2.0则你可以使用beforeShow选项像自定义/格式化title

$(".fancybox").fancybox({ 
    beforeShow : function() { 
    this.title = (this.title ? '' + this.title + '' : '') + 'Image ' + (this.index + 1) + ' of ' + this.group.length + '. You can find the whole gallery <a href="/parth/to/gallery">here</a>'; 
    } 
}); // fancybox 
0

你看到的docs

选项叫做

title - 覆盖标题内容,接受任何HTML