jQuery UI dialog - unable to remove buttons

javascript, jquery, jquery-ui

Solution

Buttons cannot be added/set while the dialog is loading.

Problem

How do I remove the buttons in a jquery dialog? Per example, I tried re-calling .dialog with the correct new options, but the dialog seems unaffected. $('.selector').dialog('option', 'buttons', {} ); does not work, and nor does it work if actual new button strings and functions are declared. Thoughts?

Original source