MODLAO
MODLAO

Reputation: 5

Overlay and fancybox 2 - doesn't show

I try to get the overlay of Fancyboxe to display but no way. I try to setup a helper like this but nothing work.

$(".fancybox").fancybox({
      helpers : { 
       overlay: {
        opacity: 0.8, // or the opacity you want 
        css: {'background-color': '#ff0000'}
       } // overlay 
      } // helpers
    }); // fancybox

Any ideas ?

Upvotes: 0

Views: 5620

Answers (2)

Tim Kozak
Tim Kozak

Reputation: 4182

Try

#fancybox-overlay {
  width: 100%;
}

Upvotes: 0

Dom Day
Dom Day

Reputation: 2562

You need to wrap your code in a function which tells the web page to run some code when the document is finished loading.

$(document).ready( function() {

    $(".fancybox").fancybox({
        helpers : {
            overlay : {
                css : {
                    opacity: 0.8,
                    'background-color' : '#ff0000'
                }
            }
        }
    });

});

Upvotes: 2

Related Questions