I'd like to add "image 1 of x" titles to my galleries, I've done quite a bit of reading on this, but I have not gotten anything to work.
My snippet of script from this page is:
jQuery(document).ready(function ($) {
$(".fancybox").click(function () {
$.fancybox.open(window["" + $(this).data("album") + ""], {
helpers : {
thumbs : {
width : 75,
height : 50
}
}
});
});
}); // ready
My snippet of edited script from this page is:
jQuery(document).ready(function ($) {
$(".fancybox").click(function () {
$.fancybox.open(window["" + $(this).data("album") + ""], {
helpers :
thumbs : {
width : 75,
height : 50
}
{
title : { type : 'over' }
}, // helpers
beforeShow : function() {
this.title = (this.title ? '' + this.title + '' : '') + 'Image ' + (this.index + 1) + ' of ' + this.group.length;
} // beforeShow
}); // fancybox
}); // ready
Thanks much,
Craíg