Question:How I need to:
- First keyup on (search input) fires up search countdown timer and set timer to 1s.
- Every next search keyup on (search input) reset search countdown timer to 1s.
- When (search input) no longer updated and stay the same –
- Search countdown timer reached 0s and performing a search.
Why I need to (this way):
I have large database of records and using ajax method to fetch through. Every time keyup on (search input) send a request… (it’s resource waste and uncomfortable to watch how page refresh every keyup). So my way is to create “typing phase” – what I mean describe above.
Only pure JS, no libraries! Thanks.
If you have better answer, please add a comment about this, thank you!