Closed xjrcode closed 6 years ago
The constructor documentation is here https://getuikit.com/docs/lightbox#initialization
You pass the existing lightboxPanel element to retrieve the component.
Therefore you are doing the test in a bad way. Code copied from your test:
UIkit.lightboxPanel({
items: [
{source: 'images/size1.jpg', caption: '900x600'},
{source: 'images/size2.jpg', caption: '700x500'},
]
}).show();
The parameter is not an element, is an object with the config.
Yes, but the test is first creating the lightboxPanel and then showing it. The method documentation is usually about calling a method on an existing component.
Sorry then, I badly understood the documentation. I thought that lightbox
is used for elements and lightboxPanel
for javascript use (without element)
Small error on lightboxPanel constructor documentation.