Enable magnific popup on <a> tags only when it has <img> (#3114)

This commit is contained in:
iBug
2021-08-08 14:01:59 -04:00
committed by GitHub
parent 0629bb770d
commit ff5b354a9a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ $(document).ready(function() {
// add lightbox class to all image links // add lightbox class to all image links
$( $(
"a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']" "a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']"
).addClass("image-popup"); ).has("> img").addClass("image-popup");;
// Magnific-Popup options // Magnific-Popup options
$(".image-popup").magnificPopup({ $(".image-popup").magnificPopup({
+1 -1
View File
File diff suppressed because one or more lines are too long