Skip to content

Commit

Permalink
Enable magnific popup on <a> tags only when it has <img> (mmistakes#3114
Browse files Browse the repository at this point in the history
)
  • Loading branch information
iBug authored and chukycheese committed Sep 18, 2023
1 parent e053ad1 commit 5360951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $(document).ready(function() {
// 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']"
).addClass("image-popup");
).has("> img").addClass("image-popup");;

// Magnific-Popup options
$(".image-popup").magnificPopup({
Expand Down

0 comments on commit 5360951

Please sign in to comment.