From 1fb05934f766e566bf8c3f0ca72f2a1cb04e1f34 Mon Sep 17 00:00:00 2001 From: sqozz Date: Thu, 25 Mar 2021 01:04:11 +0100 Subject: [PATCH] Fix opening of details --- homepage/static/js/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homepage/static/js/index.js b/homepage/static/js/index.js index 6d72fea..cbf2ac2 100644 --- a/homepage/static/js/index.js +++ b/homepage/static/js/index.js @@ -1,10 +1,11 @@ function toggleDetails(e) { var parentElement = e.parentElement var detailsElement = parentElement.querySelector(".details"); - if (detailsElement.style.display === "none") { - detailsElement.style.display = "flex"; - } else { + console.log(detailsElement.style.display) + if (detailsElement.style.display === "flex") { detailsElement.style.display = "none"; + } else { + detailsElement.style.display = "flex"; } return false; }