K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / phpmyadmin / js / jquery /
server ip : 172.67.156.115

your ip : 172.70.179.116

H O M E


Filename/usr/share/phpmyadmin/js/jquery/jquery.debounce-1.0.5.js
Size1.14 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:12
Last modified05-Dec-2013 01:44
Last accessed06-Jul-2025 11:42
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
/**
* Debounce and throttle function's decorator plugin 1.0.5
*
* Copyright (c) 2009 Filatov Dmitry ([email protected])
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/

(function($) {

$.extend({

debounce : function(fn, timeout, invokeAsap, ctx) {

if(arguments.length == 3 && typeof invokeAsap != 'boolean') {
ctx = invokeAsap;
invokeAsap = false;
}

var timer;

return function() {

var args = arguments;
ctx = ctx || this;

invokeAsap && !timer && fn.apply(ctx, args);

clearTimeout(timer);

timer = setTimeout(function() {
!invokeAsap && fn.apply(ctx, args);
timer = null;
}, timeout);

};

},

throttle : function(fn, timeout, ctx) {

var timer, args, needInvoke;

return function() {

args = arguments;
needInvoke = true;
ctx = ctx || this;

if(!timer) {
(function() {
if(needInvoke) {
fn.apply(ctx, args);
needInvoke = false;
timer = setTimeout(arguments.callee, timeout);
}
else {
timer = null;
}
})();
}

};

}

});

})(jQuery);