jquery-doTmpl
jQuery templating plugin powered by doT engine - fast and simple
Installing doT plugin
$ bower install jquery-doTmpl
doTmpl of course depends on doT.js
How to use
html
<!-- container with initial data values --><!-- be careful "data-param-name-one" attribute will be interpreted as "it.paramNameOne" see https://www.w3.org/TR/html5/dom.html#dom-dataset Writing a statement like: $( "body" ).data( { "my-name": "aValue" } ).data(); will return: { myName: "aValue" }--> <!-- Template -->
javascript
// usage: $('.container.selector').doTmpl('templateId', templateData); { var $cartConteiner = ; // after initialization plugin cached template and no need to specify templateId ;}jQuery