fix(gallery): unwrap <p> for justified gallery to work
This commit is contained in:
parent
2ebfaeb406
commit
d150e555ce
|
@ -3,6 +3,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
$('.article').lightGallery({ selector: '.gallery-item' });
|
||||
}
|
||||
if (typeof ($.fn.justifiedGallery) === 'function') {
|
||||
if ($('.justified-gallery > p > .gallery-item').length) {
|
||||
$('.justified-gallery > p > .gallery-item').unwrap();
|
||||
}
|
||||
$('.justified-gallery').justifiedGallery();
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue