Skip to content

Commit

Permalink
js linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rrusher committed Dec 22, 2023
1 parent e26e6ea commit 1f06d65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blocks/look-ahead-list/look-ahead-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ function filterFunction() {
const div = document.getElementById('myDropdown');
const a = div.getElementsByTagName('a');
for (i = 0; i < a.length;) {
txtValue = a[i].textContent || a[i].innerText;
const txtValue = a[i].textContent || a[i].innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
a[i].style.display = '';
} else {
a[i].style.display = 'none';
}
i = i + 1;
i += 1;
}
}

// Show/hide the dropdown when clicking on the input field
function dropClick() {
function dropClick(event) {
if (event.target.closest('.dropdown') !== null) {
document.getElementById('myDropdown').style.display = 'block';
}
Expand All @@ -47,7 +47,7 @@ function closeDropdown(event) {
if (openDropdown.style.display === 'block') {
openDropdown.style.display = 'none';
}
i = i + 1;
i += 1;
}
}
}
Expand Down

0 comments on commit 1f06d65

Please sign in to comment.