Skip to content

Commit

Permalink
replace invalid js with old style loop
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoJokhan committed Sep 13, 2023
1 parent 5d91875 commit 6c02800
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ $(document).ready(function () {
selectIdea(window.ideaId, true);
}

var nodes = document.querySelectorAll(".resource-overview-tag-select-group");

// Add toggle to the select-groups
document.querySelectorAll(".resource-overview-tag-select-group").forEach((node) => {
node.addEventListener("click", () => {
node.classList.toggle("selected");
})});
for(var i = 0; i < nodes.length; i++) {
var node = nodes[i];
node.addEventListener("click", function() {
node.classList.toggle("selected");
});
}

if ($('#ideaList li').length) {
// Make sure the gridder-mouse-over is visible when tabbing through the buttons
Expand Down

0 comments on commit 6c02800

Please sign in to comment.