| Issue 30: | How to change a opacity overlay? | |
| 2 people starred this issue and may be notified of changes. | Back to list |
How to make it transparent overlay?
Jun 18, 2008
in thickbox i uses to opacity:
.TB_overlayBG {
background-color:#000;
filter:alpha(opacity=50);
-moz-opacity: 0.50;
opacity: 0.50;
}
in nyromodal no is possible?
Jun 18, 2008
No.
You have to redefine the showBackground animation callback, like that:
$(function() {
$.fn.nyroModal.settings.showBackground = function(elts, settings, callback) {
elts.bg.css({opacity:0}).fadeTo(500, 0.75, callback);
};
});
And of course you can change the 0.75.
I don't want put some non-valid CSS. That's why I'm using jQuery to set the opacity
of the background.
|
You need just to redefine the showBackground animation callback. And, it could be a good idea to also redefine the hideBackgrdound function as you don't need anymore a fading. For instance, if you want to redefine for every nyroModal, you can use: $(function() { $.fn.nyroModal.settings.showBackground = function(elts, settings, callback) { elts.bg.hide(); callback(); }; $.fn.nyroModal.settings.hideBackground = function(elts, settings, callback) { callback(); }; });Labels: -Type-Defect Type-Other