(func, wait, debounce)
| 1179 | } |
| 1180 | |
| 1181 | function throttle(func, wait, debounce) { |
| 1182 | var timeout; |
| 1183 | return function () { |
| 1184 | var context = this, |
| 1185 | args = arguments; |
| 1186 | var throttler = function () { |
| 1187 | timeout = null; |
| 1188 | func.apply(context, args); |
| 1189 | }; |
| 1190 | if (debounce) clearTimeout(timeout); |
| 1191 | if (debounce || !timeout) timeout = setTimeout(throttler, wait); |
| 1192 | }; |
| 1193 | } |
| 1194 | |
| 1195 | function inputTypeColorSupport() { |
| 1196 | return $.fn.spectrum.inputTypeColorSupport(); |