| author | ymh <ymh.work@gmail.com> |
| Fri, 14 Mar 2014 13:16:10 +0100 | |
| changeset 611 | fa66f4bb1563 |
| parent 602 | e16a97fb364a |
| permissions | -rw-r--r-- |
| 602 | 1 |
YUI.add("yui-throttle",function(e,t){ |
2 |
/*! Based on work by Simon Willison: http://gist.github.com/292562 */ |
|
3 |
;e.throttle=function(t,n){n=n?n:e.config.throttleTime||150;if(n===-1)return function(){t.apply(this,arguments)};var r=e.Lang.now();return function(){var i=e.Lang.now();i-r>n&&(r=i,t.apply(this,arguments))}}},"@VERSION@",{requires:["yui-base"]}); |