In bootbox.js, by default Ok button showing after Cancel button. I want it to be first and then cancel. Here is the situation of current scenario,
http://paynedigital.com/img/confirm-simple.png
I need Ok button first. I have scene its documentation but didn't find a way to do it.
You can change order of the buttons. Try:
bootbox.confirm({
title: "danger - danger - danger",
message: "Are you sure of this?",
buttons: {
cancel: {
label: "Cancel",
className: "btn-default pull-right"
},
confirm: {
label: "Delete",
className: "btn-danger pull-left"
}
},
callback: function(result) {
// Do your stuff here
}
});
Hope this works for you.
You can do it by CSS.
.modal-footer button {
float:right;
margin-left: 10px;
}
Here is working fiddle http://jsfiddle.net/9L3A9/51/
In the meantime, the Bootbox team has added a new option called swapButtonOrder
that you have to switch to true to do it easily.
Check my working demo with Bootbox v5 here : http://jsfiddle.net/2z8tb6fk/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With