From 3f77a1478d47386bda7197d829e4f99107c5b6af Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 12 May 2021 09:26:01 +0200 Subject: [PATCH] Flash item detail background --- static/css/map.css | 4 ++++ static/js/map.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/static/css/map.css b/static/css/map.css index 7ff40a3..335fa63 100644 --- a/static/css/map.css +++ b/static/css/map.css @@ -17,6 +17,10 @@ background: lightgray; } +.bg-highlight { + background: lightgray !important; +} + #load-btn { position: absolute; top: 20px; diff --git a/static/js/map.js b/static/js/map.js index f295f98..527596f 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -320,6 +320,11 @@ function mouse_events(marker, qid) { marker.on("click", function () { isa_card.classList.add("visually-hidden"); detail_card.classList.remove("visually-hidden"); + detail_card.classList.add("bg-highlight"); + + window.setTimeout(function() { + detail_card.classList.remove("bg-highlight"); + }, 500); var item_detail = build_item_detail(items[qid].wikidata); detail.innerHTML = item_detail;