Created
November 6, 2011 17:46
-
-
Save makeusabrew/1343224 to your computer and use it in GitHub Desktop.
bootbox.js - confirm with custom labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bootbox.confirm("Are you sure?", "No way!", "Yes, definitely!", function(result) { | |
console.log("Confirmed? "+result); | |
}); |
same getting the issue
i believe this is due to an update to bootbox.... i was having the same issue and tried the code below and got it working.
bootbox.confirm({
title: "danger - danger - danger",
message: "Your custom message here",
buttons: {
cancel: {
label: "Cancel or something",
className: "btn-default pull-left"
},
confirm: {
label: "Delete or something",
className: "btn-danger pull-right"
}
},
callback: function(result) {
if (result) {
alert("confirm ok");
} else {
alert("confirm cancel");
}
}
});
credit to bootboxjs/bootbox#256 and
http://plnkr.co/edit/iTvCwyDxPods1FCtPBJc?p=preview
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you explain why this custom confirm dialog always launch this error: Uncaught Error: Invalid argument length.