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:
- $("#jquerydialog")
- .dialog('option', 'title', 'Upload an image')
- .dialog('option', 'buttons', {
- 'Create an account': function() {
- },
- 'Close': function() {
- $(this).dialog('close');
- }
- })
- .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:)