views:

184

answers:

1

I would like to have more than one button. I tried to copy code between brackets but doesnt work.Ideas?

buttons: {

"Close": function() {
 $(this).dialog("close");

}
+4  A: 

Create them using this format, 'button text': function() { } with a comma inbetween, like this:

$("#mydialog").dialog({
  buttons: {
    'Confirm': function() {
       //do something
       $(this).dialog('close');
    },
    'Cancel': function() {
       $(this).dialog('close');
    }
  }
});
Nick Craver