Throttle or Delay JavaScript Functions When Window is Resized [code snippet]

  • read
  • Add to Flipboard Magazine.

Underscore.js has a popular method for throttling and debouncing functions to prevent them from firing multiple times when a window is resized. I found this delay function that works for times when you don’t need to load the entire underscore library to achieve a similar effect.

Written by: Jacob Lett - Jacob is a marketing and web design consultant who helps manufacturers grow their revenue. Unlike his competitors, he focuses on small and consistent website design changes to increase results. He recently created the Industrial HubSpot Theme to help manufacturers quickly build their website on the HubSpot platform.
Category: Code Snippets
Tags: ,

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.

The Artistic Side of web design 1

Advertise Here