Software: Apache. PHP/5.6.40 uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24 uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) Safe-mode: OFF (not secure) /home/cp949260/public_html/phbcoop.com/vendor/afterresize/ drwxr-xr-x |
Viewing file: Select action/file-type: ( function( $ ) { "use strict"; // Define default settings var defaults = { action: function() {}, runOnLoad: false, duration: 500 }; // Define global variables var settings = defaults, running = false, start; var methods = {}; // Initial plugin configuration methods.init = function() { // Allocate passed arguments to settings based on type for( var i = 0; i <= arguments.length; i++ ) { var arg = arguments[i]; switch ( typeof arg ) { case "function": settings.action = arg; break; case "boolean": settings.runOnLoad = arg; break; case "number": settings.duration = arg; break; } } // Process each matching jQuery object return this.each(function() { if( settings.runOnLoad ) { settings.action(); } $(this).resize( function() { methods.timedAction.call( this ); } ); } ); }; methods.timedAction = function( code, millisec ) { var doAction = function() { var remaining = settings.duration; if( running ) { var elapse = new Date() - start; remaining = settings.duration - elapse; if( remaining <= 0 ) { // Clear timeout and reset running variable clearTimeout(running); running = false; // Perform user defined function settings.action(); return; } } wait( remaining ); }; var wait = function( time ) { running = setTimeout( doAction, time ); }; // Define new action starting time start = new Date(); // Define runtime settings if function is run directly if( typeof millisec === 'number' ) { settings.duration = millisec; } if( typeof code === 'function' ) { settings.action = code; } // Only run timed loop if not already running if( !running ) { doAction(); } }; $.fn.afterResize = function( method ) { if( methods[method] ) { return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ) ); } else { return methods.init.apply( this, arguments ); } }; })(jQuery); |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.1652 ]-- |