function delayed () {
if (!execAsap)
func.apply(obj, args);
- timeout = null;
+ timeout = null;
};
if (timeout)
else if (execAsap)
func.apply(obj, args);
- timeout = setTimeout(delayed, threshold || 100);
+ timeout = setTimeout(delayed, threshold || 100);
};
}
jQuery.fn[sr] = function(fn){ return fn ? this.bind('keypress', debounce(fn, 1000)) : this.trigger(sr); };