jquery-handlebars
jquery-handlebars copied to clipboard
Added render callback argument
This PR modifies the $.fn.render
function to add a third callback
argument. When a function is passed as the third argument, the function is executed in the rendered element's context upon successful application of the template. This is useful in chaining template loads.
The $.when( /* ... */ ).done()
can also be used to arrive to the desired effect, but this is more intuitive for beginners and for rapid prototyping with lesser codes.
Lint checked and README updated.
Ah. Its late, but I did some changes to use $.when
if callback was available. @frkr