user1067297
user1067297

Reputation: 47

Fancybox 2.0 title options

In Fancybox 1.3.4 there were title options, like TitlePosition, TitleFormat. Are there replacements for these options?

Thanks

Upvotes: 3

Views: 8935

Answers (3)

user1173218
user1173218

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

kanarinkabot
kanarinkabot

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

Sudhir Bastakoti
Sudhir Bastakoti

Reputation: 100175

its the same in 2.0 as well, check out the api: http://fancybox.net/api

Upvotes: 0

Related Questions