diff --git a/users/edit-kyc.php b/users/edit-kyc.php index e503578..a95c764 100644 --- a/users/edit-kyc.php +++ b/users/edit-kyc.php @@ -206,7 +206,6 @@ $BearerToken = $_SESSION['token']; var modal = document.getElementById("myModal"); - function trigger(var1, caption) { var modalImg = document.getElementById("img01"); @@ -215,9 +214,9 @@ $BearerToken = $_SESSION['token']; captionText.innerHTML = caption; } - // Close the modal when clicking outside the image + // Close the modal when clicking outside the image or x button window.onclick = function(event) { - if (event.target == modal) { + if (event.target == modal || event.target.classList.contains('closeImg')) { modal.style.display = "none"; } }