title: Disable multiple clicks JavaScript
body: <p>I am trying to disable multiple clicks on element or set a delay between each click to prevent content overloading </p>
  
  <p>I am thinking to do something like this: </p>
  
  <pre><code> var clicked = false;
  
  if(!clicked)
  {
      clicked = true;
  
      // do all my stuff right here !!
  
      setTimeout(function(){
  
          clicked = false;
      }, 3000);
  }
  </code></pre>
  
  <p>But it's not working.  Can anyone offer any suggestions? </p>