Skip to content

Instantly share code, notes, and snippets.

@hampelm
Created December 28, 2015 03:37
Show Gist options
  • Save hampelm/eb4bed285ecdb0a8f5c1 to your computer and use it in GitHub Desktop.
Save hampelm/eb4bed285ecdb0a8f5c1 to your computer and use it in GitHub Desktop.
<script type="text/template" id="repeating">
<input id="location-<%= count %>>
</script>
<form></form>
$(function() {
var template = _.template($('#repeating').html());
var newField = template({ count: 1 });
$('form').append(newField);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment