smares smares - 1 year ago 249
Javascript Question

Opening a fancyBox with a certain aspect ratio

Does anyone know how I can open a resizable fancyBox with a certain aspect ratio (for example 16:9)?

Answer Source

There isn't a native way of easily resizing Fancybox. You can do some simple math with screen.height to open a Fancybox in a particular aspect ratio relative to the current screen resolution.

var height = screen.height/4;

           'width' : 16/9. * height,
           'height' : height,
           'autoDimensions' : false
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download