Timer not running more than once
<p>For some reason when I run the below script for the first time, the timer doesn't activate again for a second time, any idea why?</p>

<pre><code> var timer = 0;
 $(document).ready(function() {
     $('#search').keypress(function() {
         if(timer == 0) { $('#sel').html('&lt;iframe src="search.php?p=' + $('#search').val() + '"&gt;&lt;/iframe&gt;');    }
         timer = 1;
         setTimeout('timer = 0;', 2000);        
      });
 });
</code></pre>

<p>Regards</p>

<p>Matthew</p>
