riix
1/9/2017 - 2:07 PM

Throttle Function 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 );
    };
}