Skip to content

Instantly share code, notes, and snippets.

@glynrob
Last active December 27, 2015 12:29
Show Gist options
  • Save glynrob/7325774 to your computer and use it in GitHub Desktop.
Save glynrob/7325774 to your computer and use it in GitHub Desktop.
Underscore Template Example
<div class="page"></div>
<script type="text/template" id="title-template">
<br class="clear" />
<div class="row">
<h3><%= header %></h3>
</div>
</script>
<script>
var template = _.template($('#title-template').html(), {header:'COLLECTIONS'});
$('.page').append(template);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment