showing big image on thumbnail click
This commit is contained in:
parent
65dca9d92e
commit
d1439514a8
@ -29,7 +29,7 @@
|
||||
"</div>" +
|
||||
|
||||
"<div class=\"post_info\">" +
|
||||
"<div>Název: " + result[i].title + "</div>" +
|
||||
"<div>Název: <span class=\"post_name\">" + result[i].title + "</span></div>" +
|
||||
"<div>Autor: " + result[i].username + "</div>" +
|
||||
((result[i].description != null) ? "<div class=\"post_desc\">Popis: <div class=\"post_desc_text\">" + result[i].description + "</div></div>" : "") +
|
||||
"</div>" +
|
||||
@ -95,6 +95,8 @@
|
||||
|
||||
$(document).on("click", ".post_image", function(event)
|
||||
{
|
||||
console.log($(this).children("img").attr("src"));
|
||||
$("#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());
|
||||
});
|
||||
</script>
|
@ -311,7 +311,8 @@ body
|
||||
border: solid 1px #3E392F;
|
||||
border-radius: 0.5vh 0.5vh;
|
||||
background-color: #555;
|
||||
display: flex;
|
||||
|
||||
display: none;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user