Reputation: 47
In Fancybox 1.3.4 there were title options, like TitlePosition
, TitleFormat
. Are there replacements for these options?
Thanks
Upvotes: 3
Views: 8935
Reputation: 29
may this helps:
$("a[rel=group]").fancybox({
openEffect : 'fade',
closeEffect : 'fade',
nextEffect : 'fade',
prevEffect : 'fade',
helpers : {
title : {
type : 'inside'
}
},
beforeShow : function(opt) {
if(this.element.title==''){
this.element.title='Image '+ (this.index + 1) + ' / ' + this.group.length;
this.title=this.element.title;
}
}
});
Upvotes: 3
Reputation: 73
Here's the answer: Fancybox v2 override/format title
You need to use the beforeLoad() function to load a custom title element -
$(".fancybox").fancybox({
openEffect : 'elastic',
openEasing : 'easeOutBack',
closeEffect : 'elastic',
closeEasing : 'easeInBack',
helpers : {
title : {
type : 'inside'
}
},
beforeLoad : function() {
this.title = 'My Custom Title';
}
});
Upvotes: 3
Reputation: 100175
its the same in 2.0 as well, check out the api: http://fancybox.net/api
Upvotes: 0