Skip to content

Instantly share code, notes, and snippets.

@perymimon
Last active March 15, 2019 13:14
Show Gist options
  • Save perymimon/7666739 to your computer and use it in GitHub Desktop.
Save perymimon/7666739 to your computer and use it in GitHub Desktop.
test delete it if you see it From http://www.gistboxapp.com/clipper-tutorial/
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment