Filtered masonry in uikit shows all images in lightbox, but should show only filtered

57 Views Asked by At

I use uikit amd a masonry gallery with filtering. Masonry does the job, but if I open the lightbox by clicking on one image after filtering and click next or previous all images are shown, not only the filtered. Is there anybody help me what to do. Websearch brough up a solution that doesn't work in my uikit.

UIkit.util.ready(function () { 
    var element = UIkit.util.$('.js-filter');
    UIkit.util.attr(element, 'uk-lightbox', 'toggle: > div:not([style*="display: none"]) a[data-type];');    
}); 

But this is not working.

0

There are 0 best solutions below