If you have only used the declarative way of using Lity, everything should work as before. The only major breaking change happened for the programmatic setup of lightboxes and the event handler signatures.
The lity
function no longer returns a function but is used directly to open
URLs (or HTML) in a lightbox.
var lightbox = lity(options);
lightbox('//www.youtube.com/watch?v=XSGBVzeBUbk');
lity('//www.youtube.com/watch?v=XSGBVzeBUbk', options);
Event handlers bound to Lity's custom events receive now only one additional
parameter: a Lity
instance.
$(document).on('lity:open', function(event, lightbox, trigger) {
lightbox.close();
});
$(document).on('lity:open', function(event, instance) {
instance.close();
var trigger = instance.opener();
});
If you configured links for the specific iframe handler, be aware that YouTube, Vimeo and Google Maps URLs are now handled by their dedicated handlers.
<a href="http://www.youtube.com/watch?v=XSGBVzeBUbk" data-lity="{"handler": "iframe"}">Video</a>
<a href="http://www.youtube.com/watch?v=XSGBVzeBUbk" data-lity="{"handler": "youtube"}">Video</a>