mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
fixed new item showing up not highlighted
This commit is contained in:
parent
73fbcf6d85
commit
6c0a0f0406
1 changed files with 1 additions and 2 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue