kvendrik/responsive-images.js — pull request #12 by adambom (2014-02-20 18:21:27+00:00)
Title: Throttle makeImagesResponsive for window resize event to twice per second. FIxes #4

Did a couple things. Wrap the entire program in a closure to allow us to safely create local variables. Also introduced a local throttle function, which will execute the given function at most every wait ms (see http://underscorejs.org/docs/underscore.html#section-71).

When attached to the window's resize event, we instruct `makeImagesResponsive` to execute at most every 500ms, or twice per second.