Edit text and addClass at Dialog Button

Edit text and addClass at Dialog Button

Hi guys, I've another question for you ... 

I've create a function for open a dialog like this

  1. function dialogOpen(div, width, height, text){
  2.       $(div).dialog({
  3.       autoOpen: false,
  4.       width: width,
  5.       height: height,
  6.       modal: false,
  7.       buttons: {text:function(){ }},
  8.       close: function() {$(div).remove();}
  9. });
  10.       $(div).dialog( "open" );
  11. }

  12. $(document).on('click', '.openDialog', function()dialogOpen('divClient', 'auto', 'auto', 'New');});
I would like to Know :
  1. Why the text of dialog-button is 'text' and no 'New'? How can I do it?
  2. How can I addClass('newClient') at the same button?
Thanks so much

Bye