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