title: Create button array for jquery dialog
body: <p>Is it possible to create a button array then append it to a jQuery dialog?</p>
  
  <p>Something along these lines.  Forgive my errorful code within the for loop, just not sure how to do this at all. </p>
  
  <pre><code>function setAutoDialog()
  {
      var testArray = ["T1", "T2"];
      $('#autoDialog').dialog({
          autoOpen: false,
          width: 'auto',
      });
      var buttons = {};
      for(var i=0; i&lt;testArray.length; i++){
          buttons += [testArray[ix] : Test()]
      }
      $('#autoDialog').dialog('option', 'buttons', buttons);
  }
  
  function Test()
  {
      alert("worked");
  }
  </code></pre>