OnKeyUp event with timer?
<p>JQuery is kind of new to me and I set up a search suggestions system using ajax that works great but works pretty slow due to the onKeyUp limitation.  After some reading I found that I can set a timer on the event. So what I am trying to do is set a timer on the 'prod-name-input' input field onKeyUp event, so that it is called every 2 seconds. I found a few examples for this online, but I wasn't able to apply any of them to my code successfully, I was wondering if someone can walk me through how this works? many thanks in advance.</p>

<p>My input field</p>

<pre><code>&lt;input onKeyUp="search(this.value)" type="text" class="prod-name-input"/&gt;
</code></pre>

<p>JS</p>

<pre><code>function search(searchword) {
        $('.smart-suggestions').load('invoice-get-data.php?searchword=' + searchword);  
    }
</code></pre>
