From b25632188abfb0548387a82f1b67d6088d8cdf90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Fri, 11 Dec 2020 17:53:42 +0100 Subject: [PATCH] Template string --- animations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/animations.js b/animations.js index 82f5d68..58e919f 100644 --- a/animations.js +++ b/animations.js @@ -59,8 +59,8 @@ $(".close").on('click', function(e) { $("body").css('overflow', 'auto'); - var bounding_box = $(this).parent().get(0).getBoundingClientRect(); - $(this).parent().css({ top: bounding_box.top + 'px', left: bounding_box.left + 'px' }); + const bounding_box = $(this).parent().get(0).getBoundingClientRect(); + $(this).parent().css({ top: `${bounding_box.top}px`, left: `${bounding_box.left}px` }); /* Show animation */ $(this).parent().addClass('out-animation');