title: Jquery UI dialog buttons text not working
body: <p>I am creating a modal JQuery UI Dialog box and storing the result in the $dialog variable. The buttons change depending on which operation is chosen, so I set the buttons using a function call like this:</p>
  
  <pre><code>$dialog.dialog( "option", "buttons", [
      {
          text: "Ok",
          click: function() { close_project(); }
      },
      {
          text: "Cancel",
          click: function() { ($this).dialog("close"); }
      }
  ]);
  </code></pre>
  
  <p>This displays two buttons with the text '0' and '1' in them instead of 'Ok' and 'Cancel'. Also, the click functions do not appear to be working.</p>
  
  <p>I've gone over this a number of times and the syntax looks correct. What am I doing wrong?</p>