jQuery Slow Each Function

$.fn.slowEach = function(interval, callback){ var array = this; if(!array.length) return; var i = 0; next(); function next(){ if( callback.call( array[i], i, array[i] ) !== false ){ if( ++i < array.length ){ setTimeout( next, interval ); } } } };

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.