jQuery Duff's Device
Summary
Use Duff's device for faster* loops.Author
Chad Smith (email)Requires
Download
jquery-duff.js (842 bytes)License
Dual licensed under the MIT and GPL licenses.Usage
Use: $(element).duff(function(){...}); or $.duff(element,function(){...});In place of: $(element).each(function(){...}); and $.each(element,function(){...});
*Duff's device is faster in many cases, but not every case. Loop speed depends on the browser and number of iterations, and can differ on each run.