I have a fancybox gallery with a caption, containing title and image number: e.g. Title 1/2
I’d like to have the image number on the right side of the image and the title on the left. Therefore I need to wrap the img Number into a separate span tag. How do I do this?
Thats the existing markup:
<div class="fancybox-title fancybox-title-float-wrap">
<span class="child">5 / 7 - Soitinrakentajat pajalla, 2012</span>
</div
but it Should be:
<div class="fancybox-title fancybox-title-float-wrap">
<span class="child">Soitinrakentajat pajalla, 2012</span>
<span class="text-right">5 / 7</span>
</div>
The img numers are generated like this:
$(".fancybox").fancybox({
afterLoad : function() {this.title = (this.index + 1) + ' / ' + this.group.length + (this.title ? ' - ' + this.title : '');}
});
How do I do this?
Thank you
You could do something like :
See JSFIDDLE