title: Add button to jquery ui dialog
body: <p>I can not add button to this jquery ui dialog.
  if possible please give me an example .
  thanks.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          //setup new person dialog
          $('#dialog2').dialog({
              autoResize: true,
              show: "clip",
              hide: "clip",
              height: 'auto',
              width: '1000',
              autoOpen: false,
              modal: true,
              position: 'top',
              draggable: false,
              title: "انتخاب درخواست",
              open: function (type, data) {
                  $(this).parent().appendTo("form");
              }
          });
  
          $('#viewfaktor').dialog({
              autoResize: true,
              show: "clip",
              hide: "clip",
              height: 'auto',
              width: '1000',
              autoOpen: false,
              modal: true,
              position: 'top',
              draggable: true,
              title: "مشاهده صورت ریز",
              open: function (type, data) {
                  $(this).parent().appendTo("form");
              }
          });
  
  
          $('#msgBox').dialog({
  
  
              autoResize: true,
              show: "clip",
              hide: "clip",
              height: 'auto',
              width: 'auto',
              autoOpen: false,
              modal: true,
              position: 'center',
              draggable: false,
  
  
  
              open: function (type, data) {
                  $(this).parent().appendTo("form");
              }
  
  
          });
  
  
  
      });
  
      function showDialog(id) {
          $('#' + id).dialog("open");
      }
  
      function closeDialog(id) {
          $('#' + id).dialog("destroy");
      }
  
  
  
  &lt;/script&gt;
  </code></pre>