Skip to content

Commit

Permalink
Merge pull request #4 from vanboom/master
Browse files Browse the repository at this point in the history
Remove manually loaded modal from DOM when closed, kylefox#301
  • Loading branch information
styletronix authored May 6, 2023
2 parents eff807f + eaf93ff commit 10d0588
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
} else {
this.$elm = el;
this.anchor = el;
this.$body.append(this.$elm);
remove = function(event, modal) { modal.elm.remove(); };
this.$body.append(this.$elm).on($.modal.CLOSE, remove);
this.open();
}
};
Expand Down

0 comments on commit 10d0588

Please sign in to comment.