title: Jquery .dialog disable submit button after click
body: <p>I am customizing a wordpress theme. When the user clicks the submit button it should be disabled.</p>
  
  <p>I was not able to figure out how to do it.
  Here is the code. Could someone please tell me how to do this.</p>
  
  <pre><code>jQuery('.modal-content').dialog({
                  autoOpen: false, 
                  title: 'Confirm your Res', 
                  resizable: false,
                  height: 175,
                  width: 300, 
                  modal: true, 
                  buttons: {
                      Submit: function() {                                    
  
                          jQuery('form[name="booking-form"]').get(0).submit();
                      }, 
                      Cancel: function() {
                          jQuery(this).dialog("close");
  
                      }
                  }
              });
  </code></pre>