Skip to content

Commit 5360951

Browse files
iBugchukycheese
authored andcommitted
Enable magnific popup on <a> tags only when it has <img> (mmistakes#3114)
1 parent e053ad1 commit 5360951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/js/_main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $(document).ready(function() {
8484
// add lightbox class to all image links
8585
$(
8686
"a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']"
87-
).addClass("image-popup");
87+
).has("> img").addClass("image-popup");;
8888

8989
// Magnific-Popup options
9090
$(".image-popup").magnificPopup({

0 commit comments

Comments
 (0)