Skip to content Skip to sidebar Skip to footer

Jquery Fancybox Overlay Color

I have tried to get a Fancybox iFrame to load automatically and to give the overlay a different color. So far so good on the autoload. Got it working. The color I couldn't get to c

Solution 1:

Just set the background color before showing of fancybox.

$(".fancybox").fancybox({
    beforeShow : function() {
        $('.fancybox-overlay').css({'background-color' :'#ec2d2d'});
    }
});

and then remove .fancybox() from $("#hidden_link").fancybox().trigger('click');

Just like this it'll work perfectly.

Solution 2:

You should be able to change the overlay color in CSS

#fancybox-overlay{background-color:#ec2d2d!important;}

Solution 3:

You can execute the overlay alone,

$.fancybox.helpers.overlay.open({parent: $('body')});

Post a Comment for "Jquery Fancybox Overlay Color"