Display item counter next to search form. #6

Merged
snoopy merged 5 commits from item-counter into main 2024-05-07 22:36:49 +02:00
Showing only changes of commit 4deb81600e - Show all commits

View file

@ -104,10 +104,10 @@ function updateCounter(){
switch(count) { switch(count) {
case 0: case 0:
document.getElementById('itemcount').textContent = `No items found.`; document.getElementById('itemcount').textContent = 'No items found.';
break; break;
case 1: case 1:
document.getElementById('itemcount').textContent = `${count} item found.`; document.getElementById('itemcount').textContent = '1 item found.';
break; break;
default: default:
document.getElementById('itemcount').textContent = `${count} items found.`; document.getElementById('itemcount').textContent = `${count} items found.`;