|
|
@ -52,3 +52,17 @@ function removeClass(element, name) { |
|
|
|
} |
|
|
|
element.className = arr1.join(" "); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let searchInput = document.getElementById('tagsearch'); |
|
|
|
let timeout = null; |
|
|
|
// Listen for keystroke events
|
|
|
|
searchInput.addEventListener('keyup', function (e) { |
|
|
|
// Clear the timeout if it has already been set.
|
|
|
|
clearTimeout(timeout); |
|
|
|
|
|
|
|
// Make a new timeout set to go off in 1000ms (1 second)
|
|
|
|
timeout = setTimeout(function () { |
|
|
|
console.log('Input Value:', searchInput.value); |
|
|
|
}, 1000); |
|
|
|
}); |
|
|
|