0.0.3 • Published 9 years ago

jq-render v0.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

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' });