Enable magnific popup on <a> tags only when it has <img> (#3114)
This commit is contained in:
parent
0629bb770d
commit
ff5b354a9a
2 changed files with 2 additions and 2 deletions
|
@ -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({
|
||||||
|
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue