React to an event only once every 5 seconds
<p>I'm trying to run a function using <code>setInterval()</code> and click. I want run the function <code>somefunction()</code> only once in every five seconds when i click.</p>

<p>Here is my code:</p>

<pre><code>function somefunction(){ // do something }

setInterval(function(){
  $('#division').one("click",function(){
    somefunction();
  });
}, 5000);
</code></pre>

<p>The issue here is, the event <code>setInterval()</code> is queuing up and say after 30 secs the function <code>somefunction()</code>; runs upto 6 times (for 6 clicks). </p>

<p>But I want it to run only once and wait for next 5 seconds.</p>

<p>I have tried <code>.stop()</code>, <code>.dequeue()</code> and <code>.clearqueue()</code> although nothing worked.</p>

<p>Thanks for your help!</p>
