In the colorbox plugin, I’ve got this line:
.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
For my purposes, I need the overflow set to ‘visible’. If I do this:
.css({width: getWidth(), overflow: settings.scrolling ? 'visible' : 'visible'})
then everything works fine. But I’d like to understand what’s going on (mostly at the end of the line). I’d guess it means something like “if the setting is this then do this, otherwise do this”. Is that right? I guess I just don’t understand what the syntax is and such.
Thanks.
You can just do this:
And yes, you’re right about what the last line is doing. It’s a ternary operation.