jquery-handlebars icon indicating copy to clipboard operation
jquery-handlebars copied to clipboard

Added render callback argument

Open shamasis opened this issue 10 years ago • 1 comments

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.

shamasis avatar Nov 10 '14 04:11 shamasis

Ah. Its late, but I did some changes to use $.when if callback was available. @frkr

shamasis avatar Jun 14 '17 19:06 shamasis