title: jQuery event only every time interval
body: <pre><code>$(document).ready(function() {
  
      $('#domain').change(function() {
  
          //
  
      });
  
  });
  </code></pre>
  
  <p>The code inside the change function will basically send ajax request to run a PHP script. The #domain is a text input field. So basically what I want to do is to send ajax requests as user types in some text inside the text field (for example search suggestions).</p>
  
  <p>However, I would like to set a time interval in order to lessen the load of PHP server. Because if jQuery sends AJAX request every time user adds another letter to the text field it would consume lots of bandwidth.</p>
  
  <p>So I would like to set let's say 2 seconds as an interval. The AJAX request will be fired every time the user types a letter but with maximum frequency of 2 seconds.</p>
  
  <p>How can I do that?</p>