I'm trying to access the html contents of an script block with the type set to "text/template". I've heard of template engines using such tags, but my application is very simple and loading an entire engine is unnecessary. Can someone shed some light on how I select that element? I think jQuery's .html() function will get me the content but I can't seem to find the element.
The template looks like:
<script type="text/template" id="repeating-form-section-template">
<div class="repeating-form-section">
<label>Field Name:</field>
<input type="text" value="default value" name="field_name" />
</div>
</script>
Things I've tried:
getElementById('repeating-form-section-template');
$('script').filter(...);
$('#repeating-form-section-template');
$("script[type='text/template']");
Thanks!
<label>Field Name:</field>).