1
/* Debounce */
2
(function (b, c) {
3
var $ = b.jQuery || b.Cowboy || (b.Cowboy = {}), a;
4
$.throttle = a = function (e, f, j, i) {
5
var h, d = 0;
6
if (typeof f !== "boolean") {
7
i = j;
8
j = f;
9
f = c
10
}
11
12
function g() {
13
var o = this, m = +new Date() - d, n = arguments;
14
15
function l() {
16
d = +new Date();
17
j.apply(o, n)
18
}
19
20
function k() {
21
h = c
22
}
23
24
if (i && !h) {
25
l()
26
}
27
h && clearTimeout(h);
28
if (i === c && m > e) {
29
l()
30
} else {
31
if (f !== true) {
32
h = setTimeout(i ? k : l, i === c ? e - m : e)
33
}
34
}
35
}
36
37
if ($.guid) {
38
g.guid = j.guid = j.guid || $.guid++
39
}
40
return g
...
</html>