jq-render
v0.0.3
Published
Simple Handlebars render plugin for jQuery
Downloads
2
Readme
jQuery Render
Simple Handlebars render plugin for jQuery
Usage
First, initialize the template.
$('#my-placeholder').render('Here is a {{Handlebar}} template');
Or with the content inside an element
<div id="my-placeholder">Hello {{name}}!</div>
And apply the plugin without parameters.
$('#my-placeholder').render();
Then simply render the template with some data.
$('#my-template').render({ name: 'World!' });
Also you can initialize the template and render at the same time.
$('#my-template').render({ name: 'World' }, 'This is another hello {{name}}!');
Once initialized the template, the render can be run again with new data.
$('#my-template').render({ name: 'Another World' });