Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions flowtype.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@
// Context for resize callback
var that = this;
// Make changes upon resize
$(window).resize(function(){changes(that);});
var to = undefined;
$(window).resize(function(){
changes(that);
//debounce resizes for slow browser that can't keep up with layout
if (to) clearTimeout(to);
to = setTimeout(function() {changes(that)}, 200);
});
// Set changes on load
changes(this);
});
};
}(jQuery));
}(jQuery));