I can't seem to add IDs to the buttons in a jQuery-created dialog. I can select the buttons after the dialog is declared via selectors as follows:
var buttons = $("#dialog").siblings(".ui-dialog-buttonpane").find("button");
but when I try to do:
buttons[0].attr('id', 'someId');
I get:
TypeError: Object #<an HTMLButtonElement> has no method 'attr'
Any suggestions? I don't see anything in the jQuery docs that implies that attr() shouldn't work on buttons.