SteveSanderson/knockout — pull request #339 by ckniffen (2012-02-23 05:44:24+00:00)
Title: afterAllRendered callback for after a foreach binding has add all elements to the DOM

Added a optional callback to foreach bindings that is executing after the binding has been fully iterated over.

The benefit of having a callback after the observable array has been iterated over is for dom mapipulations like those used in jQuery mobile to progressively enhance the just added page elements. This way it is happening all at one.

In the actual project I am using knockout on the difference between initializing the DOM elements with jQuery mobile in afterAllRender was around 3x faster.

I haven't yet decided what parameters should be passed through and was hoping for some input. I was thinking of passing in **targetNode** and possibly **filteredArray** found in **ko.renderTemplateForEach**

Demo: http://jsfiddle.net/ckniffen/n2ZTU/2/