jsor / lity

Lightweight, accessible and responsive lightbox.
https://sorgalla.com/lity/
MIT License
1.16k stars 196 forks source link

data-lity-target for programatically opened images #201

Closed Bluejay47 closed 4 years ago

Bluejay47 commented 6 years ago

Is there someone to specify a click target when using the programmatic method to load images? I am passing the image URL as the target parameter and specifying 'image' as the preferred handler.

 let options = {"href": [linkURL], "handler": "image"};
 let lightbox = lity([imageURL], options);

Thanks,