Skip to content

Commit b006a43

Browse files
committed
Update jquery.msgBox.js
In the functin show() there is a statement $(window).bind("resize", function (e) { ... }) to register a resize event handler to the window but no corresponding statement $(window).unbind("resize") in the function hide(). If we create new msgBox and close it and then repeat this operation for several times the DOM count will increase gradually.
1 parent d98c0d4 commit b006a43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/jquery.msgBox.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ function msg (options) {
224224
divMsgBoxBackGround.fadeOut(300);
225225
setTimeout(function () { divMsgBox.remove(); divMsgBoxBackGround.remove(); }, 300);
226226
setTimeout(options.afterClose, 300);
227+
$(window).unbind("resize");
227228
isShown = false;
228229
}
229230

0 commit comments

Comments
 (0)