title: avoid multiple clicks on a div
body: <p>It's probably sthg simple, but I still didn't find a solution, I would like to avoid multiple clicks on a button, before finishing an ajax call.</p>
  
  <p>Here is what I tried :  </p>
  
  <pre><code>&lt;button id="btn_pay"&gt;&lt;/button&gt;
  
  $("#btn_pay").click( function() {
      $('#btn_pay').prop('disabled', true);
      Stripe.card.createToken(form, stripeResponseHandler);
  });
  
             var stripeResponseHandler = function(status, response) {
              $.ajax({
                  type: "POST",
                  success: function(data){
                     alert("success");
                  },complete:function(){
                      //we re-enable the button
                      $('#btn_pay').prop('disabled', false);
                  }
              });
  </code></pre>
  
  <p>Problem :
  If I click several times on the button, many alerts appear, it's like the button is still active, and many ajax call are done instead of jsut 1 at a time..</p>
  
  <p>Any idea ?</p>