« Back
Sammy.EventContext render ( location, data, callback, partials )
Create and return a Sammy.RenderContext calling render() on it.
Loads the template and interpolate the data, however does not actual
place it in the DOM.
Example
// mytemplate.mustache <div class="name">{{name}}</div>
render('mytemplate.mustache', {name: 'quirkey'});
// sets the `content` to <div class="name">quirkey</div>
render('mytemplate.mustache', {name: 'quirkey'})
.appendTo('ul');
// appends the rendered content to $('ul')
comments powered by Disqus