diff --git a/assets/js/lightbox.js b/assets/js/lightbox.js index fd27ff3..af7e428 100644 --- a/assets/js/lightbox.js +++ b/assets/js/lightbox.js @@ -1,5 +1,6 @@ -$(document).ready(function() { - $('div.wp-caption a:first').click(function(event) { +jQuery(document).ready(function() { + const $ = jQuery; + $('div.wp-caption a:first-child').click(function(event) { event.preventDefault(); var imgSrc = $(this).attr('href'); $('#lightbox-img').attr('src', imgSrc); diff --git a/style.css b/style.css index 0bb9d12..762dc3e 100644 --- a/style.css +++ b/style.css @@ -181,8 +181,8 @@ a h5 { .lightbox-content { margin: auto; display: block; - width: 80%; - max-width: 700px; + max-width: 80vw; + max-height: 90vh; } .lightbox-close {