Skip to content

Commit 10d0588

Browse files
authored
Merge pull request #4 from vanboom/master
Remove manually loaded modal from DOM when closed, kylefox#301
2 parents eff807f + eaf93ff commit 10d0588

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jquery.modal.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
} else {
8080
this.$elm = el;
8181
this.anchor = el;
82-
this.$body.append(this.$elm);
82+
remove = function(event, modal) { modal.elm.remove(); };
83+
this.$body.append(this.$elm).on($.modal.CLOSE, remove);
8384
this.open();
8485
}
8586
};

0 commit comments

Comments
 (0)