gabaum10
gabaum10

Reputation: 3827

Jquery Dialog and stacked buttons

Just wondering if anyone knows how to get the buttons to stack in a Jquery modal window? It looks like this:

$confirm.dialog({
        resizable: false,
        modal: true,
        height: 140,
        closeOnEscape: true,
        show: "blind",
        buttons: [
            {
                text: "Button 1",
                click: function() { $(this).dialog("close"); },
                class:'ok_button'
            },
            {
                text: "Button 2",
                click: function() { $(this).dialog("close"); },
                class:'ok_button'
            },
            {
                text: "Button 3",
                click: function() { $(this).dialog("close"); },
                class:'ok_button'
            }
        ],
        create: function(event, ui){
           console.log($(event.target).prev().remove());
           console.log(ui);
        }
    });

This puts the buttons side by side, any clues? Thanks for the help!

Upvotes: 0

Views: 368

Answers (1)

gilly3
gilly3

Reputation: 91487

Use display: block:

.ok_button { display: block; }

http://jsfiddle.net/NMyHG/

Upvotes: 1

Related Questions