Update - October 2011: Please see recent post: "jQuery Templates and JsViews: The Roadmap" for current information on the jQuery Templates roadmap.
Joint announcements were made today by jQuery and Microsoft that jQuery has decided to make the jQuery Templates, Data Link, and Globalization plugins 'Official jQuery Plugins'.
See the following blog announcements for more details:
- jQuery Templates, Data Link, and Globalization Accepted as Official jQuery Plugins
- New Official jQuery Plugins Provide Templating, Data Linking and Globalization
What this means:
A new home for the plugins...
First thing it means, of course, is that the repositories where those plugins live have now moved to a new home. The code that was at GitHub under the http://github.com/nje/ project has been moved to the following repositories under the jQuery project:- jQuery Templates: http://github.com/jquery/jquery-tmpl/
- jQuery DataLink: http://github.com/jquery/jquery-datalink/
- jQuery Globalization: http://github.com/jquery/jquery-global/
The previous repositories under the http://github.com/nje/ project may continue to exist, but if they do then it will be for exploratory work which may or may not find its way back into the official plugins in a later update.
New documentation on the jQuery API site...
Another very important consequence of this announcement is that from now on, documentation for the jQuery Templates plugin and for the jQuery Data Link plugin will be available on the jQuery API site at http://api.jquery.com.From today, new documentation is available there, which is much more complete than the previous Wiki provided on our repository.
- The following link provides a list of all the documentation topics for the jQuery Templates plugin:
http://api.jquery.com/category/plugins/templates
- And the following link provides a list of all the documentation topics for the jQuery Data Link plugin:
http://api.jquery.com/category/plugins/data-link
API documentation topics:
- jQuery.tmpl() and .tmpl():
These APIs are used to render a jQuery template:
http://api.jquery.com/tmpl
http://api.jquery.com/jQuery.tmpl
- jQuery.tmplItem() and .tmplItem():
These APIs are used to find a jQuery template instance, and are crucial for providing interactivity:
http://api.jquery.com/tmplitem
http://api.jquery.com/jQuery.tmplitem
- jQuery.template() and .template():
These APIs are used to compile or store a jQuery template, and are particularly useful for scenarios where templates are loaded in the form of strings, such as templates retreived remotely:
http://api.jquery.com/template
http://api.jquery.com/jQuery.template
Template tag documentation topics:
- ${...}:
This tag is used to evaluate fields or JavaScript expressions within templates:
http://api.jquery.com/template-tag-equal
- {{each ...}}...{{/each}}:
This tag is used used to iterate within a template (without creating template items):
http://api.jquery.com/template-tag-each
- {{if ...}}...{{else ...}}...{{/if}}:
This tag is used used to create conditional sections within templates:
http://api.jquery.com/template-tag-if
http://api.jquery.com/template-tag-else
- {{html ...}}:
This tag is used used to insert markup obtained from data within templates:
http://api.jquery.com/template-tag-html
- {{tmpl ...}}:
This tag is used used for composition and iteration within templates (and creating new template items for each nested rendered template):
http://api.jquery.com/template-tag-tmpl
- {{wrap ...}}...{{/wrap}}:
This tag is used used for composition and iteration, along with incorporation of wrapped HTML within templates:
http://api.jquery.com/template-tag-wrap
I hope this new documentation will help you to take advantage of some of the rich features of jQuery Templates.
For extra help I'm expecting soon to provide some more blog entries that continue the series Introducing jQuery Templates...