Jquery对话框和堆叠的按钮

时间:2011-11-18 19:09:37

标签: javascript jquery html css

只是想知道是否有人知道如何让按钮在Jquery模式窗口中堆叠?它看起来像这样:

$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);
        }
    });

这会将按钮并排放置,任何线索?谢谢你的帮助!

1 个答案:

答案 0 :(得分:1)

使用display: block

.ok_button { display: block; }

http://jsfiddle.net/NMyHG/