Lightbox 2 - How to add options if lightbox js loaded as a AMD module

624 Views Asked by At

For AMD, lightbox is registered as an anonymous module. How can I set the lightbox options?

1

There are 1 best solutions below

0
On

Just call option on the module you get when you load Lightbox:

require(['lightbox'], function (lightbox) {
    lightbox.option({
        'resizeDuration': 100,
    });
});