Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #59 from noten-app/58-marking-skipped-question-as-…
Browse files Browse the repository at this point in the history
…done-removes-icon

Fix xmark circle not getting replaced correctly
  • Loading branch information
CuzImBisonratte authored Dec 13, 2023
2 parents f3cde8e + af8a43b commit 0ee8af1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homework/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ function toggleState(entry_id) {
// Toggle UI state
const element = document.getElementById("dot-" + entry_id);
if (element.innerHTML.toString().includes("fa-circle")) {
element.innerHTML = element.innerHTML.replace("fa-circle-xmark", "fa-check-circle");
element.innerHTML = element.innerHTML.replace("fa-circle", "fa-check-circle");
var checked = 1;
} else if (element.innerHTML.toString().includes("fa-check-circle")) {
Expand All @@ -18,4 +19,4 @@ function toggleState(entry_id) {
},
success: (data) => { if (data != "success") console.log(data); }
});
}
}

0 comments on commit 0ee8af1

Please sign in to comment.