Vladimir Medinsky
Vladimir Medinsky

Reputation: 102

How can I change jconfirm-buttons style craftpip/jquery-confirm

jquery-confirm version: v3.3.0 git:craftpip/jquery-confirm

jsfiddle for tests 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>

Can you help me... how can I add to div with class jconfirm-buttons my class? Is there are any solution like columnClass or btnClass for this div?

I want to justify my buttons in this div by adding bootstrap class btn-block to make div justified

<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>

Before

image

What I want to do

image

How can I do this? Is there are any solution without javascript? Or how can I do it with js (thinking that I can justify them binding this javascript on event "onOpen")?

Upvotes: 0

Views: 1280

Answers (1)

Muhammet Can TONBUL
Muhammet Can TONBUL

Reputation: 3538

Here jsfiddle link. This solution not good but still work.

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

Upvotes: 3

Related Questions