title: jquery click function block
body: <p>hello i have some question , how to block click function if a #health is clicked</p>
  
  <p>when click function is runned i can click again but how block 2 click.</p>
  
  <pre><code>$('#health').click(function() {
    var count = &lt;?=$wait_time?&gt;;
    countdown = setInterval(function(){
      $("p#health").html(count + " seconds remaining!");
      if (count == 0) {
        $.ajax({
         url: 'pages/map/hospital.php?heal=1',
         success: function(data) {
          $("p#health").hide();
         }
        });
      }
      count--;
    }, 1000);
  });
  </code></pre>