Client-side templates enable jQuery developers to easily
generate and render HTML UI on the client. Templates support a simple
syntax that enables either developers or designers to declaratively specify the
HTML they want to generate. Developers can then programmatically invoke
the templates on the client, and pass JavaScript objects to them to make the
content rendered completely data driven. These JavaScript objects can
optionally be based on data retrieved from a server.
Because the jQuery templating proposal is still evolving in
response to community feedback, the final version might look very different
than the version below. This blog post gives you a sense of how you can try out
and use templating as it exists today (you can download the prototype by the
jQuery core team at http://github.com/jquery/jquery-tmpl or the latest
submission from my team at http://github.com/nje/jquery-tmpl).