Use Duff's device for faster* loops.
jquery-duff.js (842 bytes)
Dual licensed under the MIT and GPL licenses.
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.
Each: 0 ms
Duff: 0 ms
Each: 0 ms
Duff: 0 ms
Each: 0 ms
Duff: 0 ms
© 2009 Mktg Dept