0

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")?

1 Answers1

3

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

onOpenBefore:function(){
            this.buttons.close.el[0].parentNode.className+=" btn-block";
        },
Muhammet Can TONBUL
  • 3,217
  • 3
  • 25
  • 37
  • 1
    Thank you! That's all I need. I just fix it a little adding space before "btn-block" cuz it concats with "jconfirm-buttons" and in result we have "jconfirm-buttonsbtn-block", so final solution is: this.buttons.close.el[0].parentNode.className += " btn-block"; – Vladimir Medinsky Nov 30 '17 at 08:26