From a51c40fc483760704281d1f57c622a927caf69ad Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 25 May 2024 15:36:40 +0200 Subject: [PATCH] added fucntion to the close button --- res/forum/home/home.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/res/forum/home/home.html b/res/forum/home/home.html index b1f0e66..fe219f1 100644 --- a/res/forum/home/home.html +++ b/res/forum/home/home.html @@ -9,7 +9,8 @@
- + + Tlačítko pro zavření obrázku
@@ -96,7 +97,12 @@ $(document).on("click", ".post_image", function(event) { $("#image_popup").css("display", "flex"); - $("#image_popup").children("img").attr("src", $(this).children("img").attr("src")); - $("#image_popup").children("img").attr("alt", $(this).parent(".post").children(".post_info").children("div").children(".post_name").html()); + $("#image_popup").children("#image_popup_img").attr("src", $(this).children("img").attr("src")); + $("#image_popup").children("#image_popup_img").attr("alt", $(this).parent(".post").children(".post_info").children("div").children(".post_name").html()); }); + + function close_image() + { + $("#image_popup").css("display", "none"); + } \ No newline at end of file