2012-05-09 78 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