Make a caption in fancybox?
Permalink
I've just bought the fancybox add-on and it works well, but I can't get captions with my photos.
I've googled around a bit and found that there was a way to implement this with either css or javascript:
CSS:
#tip7-title { text-align: left; }
#tip7-title b { display: block; margin-right: 80px; }
#tip7-title span { float: right; }
Javascript:
function formatTitle(title, currentArray, currentIndex, currentOpts) {
return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
}
$(".tip7").fancybox({
'showCloseButton' : false,
'titlePosition' : 'inside',
'titleFormat' : formatTitle
Is it possible to use any of these methods with Concrete5?
I've googled around a bit and found that there was a way to implement this with either css or javascript:
CSS:
#tip7-title { text-align: left; }
#tip7-title b { display: block; margin-right: 80px; }
#tip7-title span { float: right; }
Javascript:
function formatTitle(title, currentArray, currentIndex, currentOpts) {
return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
}
$(".tip7").fancybox({
'showCloseButton' : false,
'titlePosition' : 'inside',
'titleFormat' : formatTitle
Is it possible to use any of these methods with Concrete5?
This is css and javascript so you just have to add it to your page. I strongly suggest you contact the developer of the fancybox add-on you bought and ask if they can help.
Do you mean a marketplace addon or a jquery plugin you are working with directly?
If a marketplace addon, these usually have options to add title/description/link from image properties and attributes. If unclear, you can ask for support from the addon developer.
If a marketplace addon, these usually have options to add title/description/link from image properties and attributes. If unclear, you can ask for support from the addon developer.
Its an addon but i cant find such options under modify unfortunately..