Skip to content

Commit 6129ed9

Browse files
committed
Fixed jQuery 'resize' method overlapping
1 parent cdc1805 commit 6129ed9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jquery.resize.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
(function ( $ ) {
1111
var is_above_ie10 = !(window.ActiveXObject) && "ActiveXObject" in window;
1212
var supports_mutation_observer = 'MutationObserver' in window;
13-
13+
14+
var jQuery_resize = $.fn.resize;
15+
1416
$.fn.resize = function(callback) {
1517
return this.each(function() {
16-
addResizeListener(this, callback);
18+
if(this == window)
19+
jQuery_resize.call(jQuery(this), callback);
20+
else
21+
addResizeListener(this, callback);
1722
});
1823
}
1924

0 commit comments

Comments
 (0)