title: Disable submit button while processing form
body: <p>I have the following code that works well :</p>
  
  <pre><code>$(function() {
        $("input,textarea").jqBootstrapValidation({
              preventSubmit: true,
              submitError: function($form, event, errors) {
                // additional error messages or events
              },
              submitSuccess: function($form, event) {
                  event.preventDefault(); // prevent default submit behaviour
                  // get values from FORM
                  var name = $("input#name").val();
                  var email = $("input#email").val();
                  var phone = $("input#phone").val();
                  var message = $("textarea#message").val();
                  var firstName = name; // For Success/Failure Message
                  // Check for white space in name for Success/Fail message
                  if (firstName.indexOf(' ') &gt;= 0) {
                    firstName = name.split(' ').slice(0, -1).join(' ');
                  }
                  $.ajax({
                        url: "././mail/contact_me.php",
                        type: "POST",
                        data: {
                          name: name,
                          phone: phone,
                          email: email,
                          message: message
                        },
                        cache: false,
                        success: function() {
                          // Success message
                          $('#success').html("&lt;div class='alert alert-success'&gt;");
                          $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;").append("&lt;/button&gt;");
                          $('#success &gt; .alert-success').append("&lt;strong&gt;Su mensaje fue enviado. &lt;/strong&gt;");
                          $('#success &gt; .alert-success').append('&lt;/div&gt;');
                          //clear all fields
                          $('#contactForm').trigger("reset");
                          ga('send', 'event', {
                            eventCategory: 'Contactos',
                            eventAction: 'Envio contacto',
                            eventLabel: 'Español'
                          });
                        },
  </code></pre>
  
  <p>I want that while the form Sending button used to run out , so you can not send him back while processing
  as I leave the submit button disabled while sending ?
  the button code is : </p>
  
  <pre><code>&lt;button class="btn btn-xl2" type="submit"&gt;Enviar &lt;/button&gt;
  </code></pre>
  
  <p>Thanks!</p>