title: Can I disable sweet alert js buttons?
body: <p>I want to disable the button displayed in sweet alerts so that my user cannot click the button again and again. I have attached the screen shot of the alert <a href="http://i.stack.imgur.com/7trZx.png" rel="nofollow">here</a></p>
  
  <p>I want to disable the confirmation button (I don't want the alert to be closed):</p>
  
  <pre><code>swal({
      title: "Are you sure?",
      text: "You want to add this discount?",
      type: "warning",
      showCancelButton: true,
      confirmButtonColor: "#DD6B55",
      confirmButtonText: "Continue",
      cancelButtonText: "Cancel",
      closeOnConfirm: false,
      closeOnCancel: false
  }, function (isConfirm) {
      if (isConfirm) {
          document.getElementById('message_error_new_discount').innerHTML = '';
          $.post('./CURL/addNewDiscount.php', JSON.stringify({
              "code": discount_code_newDiscount,
              "percentage": percentage_newDiscount,
              "startDate": sdate_newDiscount,
              "endDate": edate_newDiscount
          }), function (data) {
              var text = "your discount code is " + data.code;
              swal({ title: "Discount Added!", text: text, type: "success" }, function () {
                  window.location = './discountlist.php';
              });
          });
      } else {
          swal({ title: "Cancelled", text: "", type: "error" }, function () {
              window.location = './discountlist.php';
          });
      }
  });
  </code></pre>