Permalink
Browse files

fix incorrect button binding (GH-21)

  • Loading branch information...
1 parent dc5d779 commit b02453f1ce3a079fac5fede37db575479e3bc9e1 @makeusabrew makeusabrew committed Feb 28, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 bootbox.js
  2. +1 −1 bootbox.min.js
View
@@ -360,7 +360,8 @@ var bootbox = window.bootbox || (function() {
$("a.btn-primary:last", div).focus();
});
- $("a", div).click(function(e) {
+ // wire up button handlers
+ div.on('click', '.modal-footer a', function(e) {
e.preventDefault();
hideSource = 'button';
div.modal("hide");
@@ -374,6 +375,7 @@ var bootbox = window.bootbox || (function() {
if (options.keyboard == null) {
options.keyboard = (typeof options.onEscape == 'function');
}
+
$("body").append(div);
div.modal({
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit b02453f

Please sign in to comment.