fancyapps/fancyBox — Issue #72: Can't set overlay opacity to 0
Author: sbenes
Created: 2011-12-21 20:45:08+00:00
State: open

I don't know if it is just me but I wanted to set the opacity of the overlay to 0 and couldn't. At line 1218 the code does a check to see if someone set the opacity or uses the default. This check doesn't allow a zero as my example code below show's that you can run.

var test1 = {
opacity: 0
};

var test2 = {
opacity: 0.01
};

var test3 = {
foobar: 0
};

console.log(test1.opacity || "I can't set zero");
console.log(test2.opacity || "I never wanted zero and you shouldn't see this text");
console.log(test3.opacity || "I never had it to begin with, so you should see this");