Opened 8 years ago

Closed 8 years ago

#8102 closed bug (notabug)

Dialog documentation error.

Reported by: brunofunny Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.17
Keywords: Cc:
Blocked by: Blocking:

Description

When reading:

Initialize a dialog with the buttons option specified.

    $( ".selector" ).dialog({ buttons: [
        {
            text: "Ok",
            click: function() { $(this).dialog("close"); }
        }
    ] });

when adding button it should be a bracket {} not a [], like:

    $( ".selector" ).dialog({
         buttons: { 
             {text: "Ok"}, 
             {text: "Cancel"} 
         }
    });

Change History (2)

comment:1 Changed 8 years ago by brunofunny

comment:2 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

You're confusing two different syntaxes. The proposed syntax isn't even valid JavaScript. The documentation is correct.

Note: See TracTickets for help on using tickets.