I've made a simple implementation of an autocomplete which would call ajax and load a list of matches. Here's the JSfiddle
This of course only shows an alert saying "OK" when the timer times out
You'll notice that it resets the timeout to give you a chance to finish entering what you want, ie if you pause for 0.3 seconds when typing, it will then run the search, so as not to request too many times to the server
I've also got it to only run if the number of characters are above 4 characters too
Put simply, I'm wanting to know if there is a better way of doing this in jQuery?