Class: jQuery

jQuery

new jQuery()

JQuery extensions for templating and returning the result
Source:

Methods

<static> template(list, handler)

Loop template addition to jQuery.
For example, if you want to copy a div.blog-entry using an array of entries :
$(".blog-entry").template(entries, function(entry, index) {
	 this.appendTo(".blog");
	 this.attr("id", "blog-entry-"+entry.id);
	 this.attr("data-pk", entry.id);
	 this.find(".blog-entry-title").text(entry.title);
	 this.find(".blog-entry-author").text(entry.author);
	 this.find(".blog-entry-text").text(entry.text);
});
Parameters:
Name Type Description
list Array
handler function
Source: