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

581 views Asked by At

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

1

There are 1 answers

0
Louis On

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

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