Reputation: 5
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
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