jQuery的对话框按钮的CSS

克拉西米尔

我有这样的代码:

 $("#confirm").dialog({
                modal: true,
                title: 'Confirm',
                resizable: false,
                draggable: false,
                autoOpen: false,
                height: 200,
                width: 550,
                buttons: [{
                    tabIndex: -1,

                    text: 'Yes',
                    "class": 'informationLearnButton',           
                    click: function () {
                       ...
                        }
                        else {

                        }
                        $(this).dialog("close");
                    }
                },
                    {

                        tabIndex: -1,
                        text: 'No',
                        'className': 'SomeOtherCssClass',
                    click: function () {
                        $(this).dialog("close");
                    }
                }]
            });

类对我不起作用,我尝试了带有“”和不带有“”的类,className。jQuery版本是1.8.22。现在要做什么

编码器

这是一个如何使用类的示例:

演示

$("#dialog").dialog({
    buttons: {
        'Confirm': function() {
            //do something
            $(this).dialog('close');
        },
        'Cancel': function() {
            $(this).dialog('close');
        }
    },
    create:function () {
        $(this).closest(".ui-dialog").find(".ui-button:first").addClass("custom");
    }
});

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章