How do I call a function once the browser windows has FINISHED resizing?
I\'m trying to do it like so, but am having problems. I\'m using the JQuery Resize
Underscore.js has a couple of great methods for this task: throttle and debounce. Even if you're not using Underscore, take a look at the source of these functions. Here's an example:
var redraw = function() {'redraw logic here'};
var debouncedRedraw = _.debounce(redraw, 750);
$(window).on('resize', debouncedRedraw);