Skip to content

Commit

Permalink
Merge pull request #15 from redexp/patch-2
Browse files Browse the repository at this point in the history
Yes your are right.
  • Loading branch information
newghost committed Jan 23, 2015
2 parents 35a347c + a553c16 commit 7084097
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/jquery.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Author: Kris Zhang
, $btnrow = $msgbox.find(".modal-footer");

//clear old buttons
$btnrow.html('');
$btnrow.empty();

for (var button in buttons) {
var btnObj = buttons[button]
Expand Down Expand Up @@ -90,12 +90,12 @@ Author: Kris Zhang

var close = function(destroy) {
// call the bootstrap modal to handle the hide events and remove msgbox after the modal is hidden
$msgbox.modal('hide').on('hidden.bs.modal', function() {
if (destroy) {
$this.data(parentDataName).append($this);
$msgbox.remove();
}
});
$msgbox.modal('hide').one('hidden.bs.modal', function() {
if (destroy) {
$this.data(parentDataName).append($this);
$msgbox.remove();
}
});
};

if (options.constructor == Object) {
Expand Down

0 comments on commit 7084097

Please sign in to comment.