From 6c0a0f0406e970eefded3e330ee580fba190e688 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Sun, 26 May 2019 17:09:15 +0200 Subject: [PATCH] fixed new item showing up not highlighted --- js/list.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/list.js b/js/list.js index 2e79c78..6fd4e29 100644 --- a/js/list.js +++ b/js/list.js @@ -13,7 +13,7 @@ function highlightNewEntry(){ var match = cookieRegExp.exec(cookies); if(match!=null){ var newID = match[1]; - var checkBox = $("[data-id=" + newID + "]"); + var checkBox = $(`[data-id='${newID}']`); var newRow = checkBox.parent().parent(); newRow.removeClass($(checkBox).data("color")); newRow.addClass("alert-primary"); @@ -48,7 +48,6 @@ function checkItem() { }, success: function () { var dataIdSelector = (`[data-id='${dataId}']`); - // console.log(dataIdSelector); var color = $(dataIdSelector).data("color"); $(dataIdSelector).parent().parent().removeClass("bg-danger");