diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 12:32:17 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 12:32:17 +0100 |
commit | 7f0ae82d44873b53cc87c659b42415ce4866c7b4 (patch) | |
tree | fdce14b0658bb05aef087dd4e09dc25c9a79ea8c /public/javascripts/ba-throttle-debounce.js | |
parent | 2926ee877bcf8974c529e1271ded42971fe0d632 (diff) | |
parent | 96c4dd912083edcd0c9eda76bd2301bb4a1a6d53 (diff) |
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop, fix conflicts
Diffstat (limited to 'public/javascripts/ba-throttle-debounce.js')
-rw-r--r-- | public/javascripts/ba-throttle-debounce.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/public/javascripts/ba-throttle-debounce.js b/public/javascripts/ba-throttle-debounce.js new file mode 100644 index 000000000..07205508e --- /dev/null +++ b/public/javascripts/ba-throttle-debounce.js @@ -0,0 +1,9 @@ +/* + * jQuery throttle / debounce - v1.1 - 3/7/2010 + * http://benalman.com/projects/jquery-throttle-debounce-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
\ No newline at end of file |