Prevents window resize event from triggering code on every pixel. Helpful for performing match heights and other intensive JS functions.
var resizeTimer; $(window).on('resize', function () { clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { // Code here }, 250); });