The search suggest function that I built for my previous portfolio site is a quick demonstration of timers, stopping timers, objects, events and AJAX. It has one dependent function that’s called ‘findPos’ which I found on quirksmode – it’s a cross-browser function that finds and returns the position of an element.

Show the code