style Jquery UI Dialog button added after init

style Jquery UI Dialog button added after init

Hello guys.
I'm a little bit stuck trying to figure this one out.
I use jquery ui dialog. Dialog is being created on document.ready.
I dynamically pass couple options like buttons and title intothe dialog:

  1. $("#jquerydialog")
  2. .dialog('option', 'title', 'Upload an image')
  3. .dialog('option', 'buttons', {
  4.          'Create an account': function() {
  5. },
  6. 'Close': function() {
  7. $(this).dialog('close');
  8. }
  9. })
  10. .dialog('open');






And dialog opens up just fine.
However: "Create an account" and "close" button entirely lack jquery UI styling!!!

So - I was just wondering - do I have to apply this styling dynamically? and what would be the best way of doing this?

Thanks:)