title: Set jQuery UI dialog button id?
body: <p>Is it possible to set the ID for the buttons in a jQuery UI dialog, so that I can refer to them later through jQuery? For example, trigger events, disable etc?</p>
  
  <pre><code>... in the dialog setup ...
  buttons: {               
      "Sök": function () {
          var bValid = true;
      },
      "OK": function () {
          if (OK()) {
              getStuffNoteringar($("#txtStuffId").val());
              $(this).dialog("close");
          }
      }
  
  .... later on in some javascript code....
  
  $('#OK').click(); 
  </code></pre>