javascript - 我怎样才能改变 jconfirm-buttons 风格 craftpip/jquery-confirm

标签 javascript jquery css jquery-confirm jconfirm

jquery-confirm 版本:v3.3.0 git:craftpip/jquery-confirm

用于测试的 jsfiddle https://jsfiddle.net/bdtx2ub2/

<div class="jconfirm-buttons">
<button type="button" class="btn btn-info btn-block">Update</button>
<button type="button" class="btn btn-danger btn-block">Delete</button>
<button type="button" class="btn btn-default btn-block">Cancel</button>
</div>

你能帮帮我吗……我怎样才能用类 jconfirm-buttons 添加到 div 我的类?这个 div 是否有任何解决方案,例如 columnClass 或 btnClass?

我想通过添加 Bootstrap 类 btn-block 使 div 合理化来证明我在这个 div 中的按钮合理

<div class="jconfirm-buttons btn-block">
<button type="button" class="btn btn-info btn-block">Update</button>
<button type="button" class="btn btn-danger btn-block">Delete</button>
<button type="button" class="btn btn-default btn-block">Cancel</button>
</div>

之前

image

我想做什么

image

我该怎么做?有没有没有javascript的解决方案?或者我怎样才能用 js 做到这一点(认为我可以证明他们在事件“onOpen”上绑定(bind)这个 javascript)?

最佳答案

Here jsfiddle链接。这个解决方案不好,但仍然有效。

onOpenBefore:function(){
            this.buttons.close.el[0].parentNode.className+=" btn-block";
        },

关于javascript - 我怎样才能改变 jconfirm-buttons 风格 craftpip/jquery-confirm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47568293/

相关文章:

javascript - 如何从 PEG.js 解析器导出状态变量

javascript - 如何在 Angular 中设置默认选中的单选按钮

javascript - onbeforeunload 消息出现两次 (Internet Explorer)

css - 如何在我的 css 中设置默认的伪样式?

javascript - 当我点击这个文本框时它变大但是当我点击离开我如何让它恢复正常?

javascript - 如何从 HTML 中禁用 angular2-ladda 并防止类被 ladda 覆盖

javascript - 当配置依赖于 RequireJS 时使用 RequireJS 配置模块

javascript - 如何删除jquery中先前绑定(bind)的事件

javascript - Highcharts 在开始时就失去了太多点

html - CSS- 无法对齐文本