问题
For fancyBox 1.x there was an info how to format a title. I'm missing this for the new version...
I want to add a title like "Image 1 of x. You can find the hole gallery here [=link]"
回答1:
For fancybox v2.0.x you could customize/format the title
using the beforeShow
option like:
$(".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
回答2:
did you see the docs page
the option called
title
- Overrides title content, accepts any HTML
来源:https://stackoverflow.com/questions/10512967/fancybox-2-formatting-title